From 20b55db26609b6d148579e0d6bd7b5e5cc6111ac Mon Sep 17 00:00:00 2001 From: Daniel Minor Date: Thu, 6 Mar 2025 12:09:33 -0500 Subject: [PATCH] Fix ordering of steps in WeakMap.getOrInsertComputed --- spec.emu | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec.emu b/spec.emu index 390cf0d..db7f9e8 100644 --- a/spec.emu +++ b/spec.emu @@ -75,8 +75,8 @@ markEffects: true 1. Let _M_ be the *this* value. 1. Perform ? RequireInternalSlot(_M_, [[WeakMapData]]). - 1. If IsCallable(_callbackfn_) is *false*, throw a *TypeError* exception. 1. If CanBeHeldWeakly(_key_) is *false*, throw a *TypeError* exception. + 1. If IsCallable(_callbackfn_) is *false*, throw a *TypeError* exception. 1. For each Record { [[Key]], [[Value]] } _p_ of _M_.[[WeakMapData]], do 1. If _p_.[[Key]] is not ~empty~ and SameValue(_p_.[[Key]], _key_) is *true*, return _p_.[[Value]]. 1. Let _value_ be ? Call(_callbackfn_, *undefined*, « _key_ »).