From 2f4132273bd8ecc711040777c7487e6928aedf7d Mon Sep 17 00:00:00 2001 From: Patrick Malouin Date: Fri, 19 Jun 2020 17:00:50 -0400 Subject: [PATCH] add guard clause for `utils.wrapPropertyMethod()` --- src/utils.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils.js b/src/utils.js index e965c59b6..3f534e4f8 100644 --- a/src/utils.js +++ b/src/utils.js @@ -50,6 +50,9 @@ utils.generateClientInfo = function() { */ utils.wrapPropertyMethod = function(Parent, name, propertyMethod) { var path = propertyMethod.split('.'); + if (path.length > 2) { + throw new Error('wrapPropertyMethod() only supports one level of nesting for propertyMethod'); + } var property = path.shift(); var method = path.pop();