Skip to content

Commit

Permalink
Stop using a value that script can pass in.
Browse files Browse the repository at this point in the history
  • Loading branch information
domfarolino committed Aug 28, 2024
1 parent d35a867 commit 2760e00
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -1628,15 +1628,14 @@ For now, see [https://github.com/wicg/observable#operators](https://github.com/w

1. Let |idx| be an {{unsigned long long}}, initially 0.

1. Let |accumulator| be |initialValue| if it is given, and the string "<code>unset</code>"
otherwise.
1. Let |accumulator| be |initialValue| if it is given, and uninitialized otherwise.

1. Let |observer| be a new [=internal observer=], initialized as follows:

: [=internal observer/next steps=]
::
1. If |accumulator| is the string "<code>unset</code>", then set |accumulator| to the
passed in |value|, set |idx| to |idx| + 1, and abort these steps.
1. If |accumulator| is uninitialized (meaning no |initialValue| was passed in), then set
|accumulator| to the passed in |value|, set |idx| to |idx| + 1, and abort these steps.

Note: This means that |reducer| will not be called with the first |value| that [=this=]
produces set as the {{Reducer/currentValue}}. Rather, when the *second* value is
Expand Down

0 comments on commit 2760e00

Please sign in to comment.