diff --git a/Rakefile b/Rakefile index ff38e7712..3aa2c18cb 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 50830cf97..4db802c4d 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) {