1
0
Jelajahi Sumber

boot.js: Fix optimzed asReceiver, jQuery works again

typeof "function" is object-like, too,
and can use Smalltalk optOut:
Herbert Vojčík 9 tahun lalu
induk
melakukan
66755f8195
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      support/boot.js

+ 1 - 1
support/boot.js

@@ -1100,7 +1100,7 @@ define("amber/boot", [ 'require', './browser-compatibility' ], function (require
 		 */
 		this.asReceiver = function (o) {
 			if (o == null) return nil;
-			if (typeof o === "object") {
+			if (typeof o === "object" || typeof o === "function") {
 				return o.klass != null ? o : globals.JSObjectProxy._on_(o);
 			}
 			// IMPORTANT: This optimization (return o if typeof !== "object")