You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Reflect.set throws when the receiver is null or undefined #1730
qjs > Reflect.set({}, "x", 1, null);
TypeError: cannot set property 'x' of null
Spec
Reflect.set forwards to the target's [[Set]] with the given receiver. For a data property, OrdinarySetWithOwnDescriptor reaches the step "If receiver is not an Object, return false", so an assignment through a receiver that cannot hold properties is reported as a failed assignment rather than an error.
Only null and undefined are affected: Reflect.set({}, "x", 1, 5) returns false in QuickJS-ng. The target does not matter, since a typed array throws in the same way.
Activity