Parcourir la source

Eschewing .slice()ing the arguments.

Only way the object is used in passing it along, reading .length and [0].
Therefore there is no need to actually copy it, it can be passed as-is.
Herbert Vojčík il y a 10 ans
Parent
commit
e43332a0cf
1 fichiers modifiés avec 1 ajouts et 2 suppressions
  1. 1 2
      support/boot.js

+ 1 - 2
support/boot.js

@@ -211,8 +211,7 @@ define("amber/boot", [ 'require', './browser-compatibility' ], function (require
 
 		function createHandler(selector) {
 			return function() {
-				var args = Array.prototype.slice.call(arguments);
-				return brikz.messageSend.messageNotUnderstood(this, selector, args);
+				return brikz.messageSend.messageNotUnderstood(this, selector, arguments);
 			};
 		}