Skip to content

Commit

Permalink
use proper slot in WeakMap.prototype.getOrInsertComputed (#68)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelficarra authored Nov 6, 2024
1 parent 09331a7 commit 201c059
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions spec.emu
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ contributors: Jonas Haukenes, Daniel Minor
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. For each Record { [[Key]], [[Value]] } _p_ of _M_.[[MapData]], do
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_, _key_).
1. Let _p_ be the Record { [[Key]]: _key_, [[Value]]: _value_ }.
1. Append _p_ to _M_.[[MapData]].
1. Append _p_ to _M_.[[WeakMapData]].
1. Return _value_.
</emu-alg>
</emu-clause>
Expand Down

0 comments on commit 201c059

Please sign in to comment.