aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authormrmr19932014-11-23 11:55:20 +0000
committermrmr19932014-11-23 11:57:47 +0000
commit544b9f603b2382a9afedffc544c63e19b9909549 (patch)
treeb7791c870493cee20c02609d248659562a64a813
parent176ea28aecc446be0c9788e6a59677fa94c51fee (diff)
downloadvimium-544b9f603b2382a9afedffc544c63e19b9909549.tar.bz2
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.
-rw-r--r--lib/dom_utils.coffee4
1 files changed, 2 insertions, 2 deletions
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) ->