From 9610f9a8fe2d252b5aff4295798c7a4dfa36a343 Mon Sep 17 00:00:00 2001 From: Adam Powers <apowers@ato.ms> Date: Thu, 3 Sep 2015 22:45:29 -0700 Subject: [PATCH] Rolling back change that breaks build Doesn't seem right that this should be rolled back, since it seems obvious that it's a typo, but the impact is that it breaks pretty much everything... so maybe it's not intended that evalute return an object. --- lib/jsonpath.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/jsonpath.js b/lib/jsonpath.js index 4735d57..28e0737 100644 --- a/lib/jsonpath.js +++ b/lib/jsonpath.js @@ -55,7 +55,7 @@ function JSONPath (opts, obj, expr) { if (opts.autostart !== false) { var ret = this.evaluate((objArgs ? opts.json : obj), (objArgs ? opts.path : expr)); - if (!ret || typeof ret !== 'object') { + if (!ret || typeof reg !== 'object') { throw {avoidNew: true, value: ret, message: "JSONPath should not be called with 'new'"}; } } -- GitLab