Browse Source

boot.js: Fix optimzed asReceiver, jQuery works again

typeof "function" is object-like, too,
and can use Smalltalk optOut:
Herbert Vojčík 9 years ago
parent
commit
66755f8195
1 changed files with 1 additions and 1 deletions
  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")