Index: src/macros.py |
diff --git a/src/macros.py b/src/macros.py |
index 124b1e7fba9814f07d87ec83c57556bb8770998f..ee0770bd90068d8cbd9a5a44c0507bb920b4af00 100644 |
--- a/src/macros.py |
+++ b/src/macros.py |
@@ -136,7 +136,7 @@ macro IS_SPEC_FUNCTION(arg) = (%_ClassOf(arg) === 'Function'); |
# Macro for ES6 CheckObjectCoercible |
# Will throw a TypeError of the form "[functionName] called on null or undefined". |
-macro CHECK_OBJECT_COERCIBLE(arg, functionName) = if (IS_NULL_OR_UNDEFINED(arg) && !IS_UNDETECTABLE(arg)) throw MakeTypeError(kCalledOnNullOrUndefined, functionName); |
+macro CHECK_OBJECT_COERCIBLE(arg, functionName) = if (IS_NULL(%IS_VAR(arg)) || IS_UNDEFINED(arg)) throw MakeTypeError(kCalledOnNullOrUndefined, functionName); |
# Indices in bound function info retrieved by %BoundFunctionGetBindings(...). |
define kBoundFunctionIndex = 0; |