From f2635a769ce9f7a74f4cd317f556e17c6dde55f6 Mon Sep 17 00:00:00 2001 From: Kevin Gibbons Date: Sat, 25 Nov 2023 09:22:52 -0800 Subject: [PATCH] Bugfix: fix a missed ~empty~ check in isSubsetOf (#102) --- spec/index.html | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/spec/index.html b/spec/index.html index a764b3c..4d854a8 100644 --- a/spec/index.html +++ b/spec/index.html @@ -145,10 +145,11 @@

Set.prototype.isSubsetOf ( _other_ )

1. Repeat, while _index_ < _thisSize_, 1. Let _e_ be _O_.[[SetData]][_index_]. 1. Set _index_ to _index_ + 1. - 1. Let _inOther_ be ToBoolean(? Call(_otherRec_.[[Has]], _otherRec_.[[Set]], « _e_ »)). - 1. If _inOther_ is *false*, return *false*. - 1. NOTE: The number of elements in _O_.[[SetData]] may have increased during execution of _otherRec_.[[Has]]. - 1. Set _thisSize_ to the number of elements of _O_.[[SetData]]. + 1. If _e_ is not ~empty~, then + 1. Let _inOther_ be ToBoolean(? Call(_otherRec_.[[Has]], _otherRec_.[[Set]], « _e_ »)). + 1. If _inOther_ is *false*, return *false*. + 1. NOTE: The number of elements in _O_.[[SetData]] may have increased during execution of _otherRec_.[[Has]]. + 1. Set _thisSize_ to the number of elements of _O_.[[SetData]]. 1. Return *true*.