From 3e95f2bf03c38adb988ebfab33b07389ddbc03c0 Mon Sep 17 00:00:00 2001 From: Kevin Gibbons Date: Fri, 24 Nov 2023 20:19:39 -1000 Subject: [PATCH] Bugfix: fix a missed ~empty~ check in isSubsetOf --- 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*.