From 544b9f603b2382a9afedffc544c63e19b9909549 Mon Sep 17 00:00:00 2001 From: mrmr1993 Date: Sun, 23 Nov 2014 11:55:20 +0000 Subject: Change DomUtils.makeXPath to loop as an array rather than an object This fixes the tests, which were broken by makeXPath trying to recurse over Arrays with an augmented prototype. --- lib/dom_utils.coffee | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/dom_utils.coffee b/lib/dom_utils.coffee index 62e655e7..21018049 100644 --- a/lib/dom_utils.coffee +++ b/lib/dom_utils.coffee @@ -32,8 +32,8 @@ DomUtils = # makeXPath: (elementArray) -> xpath = [] - for i of elementArray - xpath.push("//" + elementArray[i], "//xhtml:" + elementArray[i]) + for element in elementArray + xpath.push("//" + element, "//xhtml:" + element) xpath.join(" | ") evaluateXPath: (xpath, resultType) -> -- cgit v1.2.3