diff --git a/Rakefile b/Rakefile index ff38e77..3aa2c18 100755 --- a/Rakefile +++ b/Rakefile @@ -102,7 +102,7 @@ module PrototypeHelper end def self.require_nwmatcher - if !File.exists?(File.join(ROOT_DIR, 'vendor', 'nwmatcher', 'src', 'nwmatcher.js')) + if !File.exists?(File.join(ROOT_DIR, 'vendor', 'nwmatcher', 'nwmatcher', 'src', 'nwmatcher.js')) exit unless get_submodule("NWMmatcher", "nwmatcher/nwmatcher") end end diff --git a/vendor/nwmatcher/selector_engine.js b/vendor/nwmatcher/selector_engine.js index 50830cf..4db802c 100644 --- a/vendor/nwmatcher/selector_engine.js +++ b/vendor/nwmatcher/selector_engine.js @@ -8,7 +8,11 @@ delete Prototype._original_nw; Prototype.Selector = (function(NW) { function select(selector, scope) { - return NW.select(selector, scope || document, null, Element.extend); + var results = []; + NW.select(selector, scope || document, null, function(element) { + results.push(Element.extend(element)); + }); + return results; } function filter(elements, selector) {