]> source.dussan.org Git - jquery.git/commitdiff
Re-adding zeros removed from slice calls in last commit.
authorRobert Katic <robert.katic@gmail.com>
Thu, 19 Nov 2009 12:37:48 +0000 (20:37 +0800)
committerJohn Resig <jeresig@gmail.com>
Wed, 25 Nov 2009 16:58:39 +0000 (00:58 +0800)
src/event.js

index 879f049f10da3a38807f6034b14dfad04efb986c..7e8707c3b48d0a40956a1aa47d39b30d709206f8 100644 (file)
@@ -133,7 +133,7 @@ jQuery.event = {
                                        var namespaces = type.split(".");
                                        type = namespaces.shift();
                                        var all = !namespaces.length,
-                                               namespace = new RegExp("(^|\\.)" + namespaces.slice().sort().join("\\.(?:.*\\.)?") + "(\\.|$)"),
+                                               namespace = new RegExp("(^|\\.)" + namespaces.slice(0).sort().join("\\.(?:.*\\.)?") + "(\\.|$)"),
                                                special = this.special[ type ] || {};
 
                                        if ( events[ type ] ) {
@@ -291,7 +291,7 @@ jQuery.event = {
                // Cache this now, all = true means, any handler
                all = !namespaces.length && !event.exclusive;
 
-               var namespace = new RegExp("(^|\\.)" + namespaces.slice().sort().join("\\.(?:.*\\.)?") + "(\\.|$)");
+               var namespace = new RegExp("(^|\\.)" + namespaces.slice(0).sort().join("\\.(?:.*\\.)?") + "(\\.|$)");
 
                handlers = ( jQuery.data(this, "events") || {} )[ event.type ];