Skip to content

Commit 7b4cb07

Browse files
committed
Correctly existence-check SubscriptionObserver members. Closes #152.
1 parent 3384ee3 commit 7b4cb07

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

spec.bs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -478,24 +478,26 @@ An <dfn>internal observer</dfn> is a [=struct=] with the following [=struct/item
478478

479479
<dt>If |observer| is a {{SubscriptionObserver}}</dt>
480480
<dd>
481-
1. If |observer|'s {{SubscriptionObserver/next}} is not null, set |internal observer|'s
482-
[=internal observer/next steps=] to these steps that take an {{any}} |value|:
481+
1. If |observer|'s {{SubscriptionObserver/next}} [=map/exists=], then set
482+
|internal observer|'s [=internal observer/next steps=] to these steps that take an
483+
{{any}} |value|:
483484

484485
1. [=Invoke=] |observer|'s {{SubscriptionObserver/next}} with |value|.
485486

486487
If <a spec=webidl lt="an exception was thrown">an exception |E| was thrown</a>,
487488
then [=report the exception=] |E|.
488489

489-
1. If |observer|'s {{SubscriptionObserver/error}} is not null, set |internal observer|'s
490-
[=internal observer/error steps=] to these steps that take an {{any}} |error|:
490+
1. If |observer|'s {{SubscriptionObserver/error}} [=map/exists=], then set
491+
|internal observer|'s [=internal observer/error steps=] to these steps that take
492+
an {{any}} |error|:
491493

492494
1. [=Invoke=] |observer|'s {{SubscriptionObserver/error}} with |error|.
493495

494496
If <a spec=webidl lt="an exception was thrown">an exception |E| was thrown</a>,
495497
then [=report the exception=] |E|.
496498

497-
1. If |observer|'s {{SubscriptionObserver/complete}} is not null, set |internal observer|'s
498-
[=internal observer/complete steps=] to these steps:
499+
1. If |observer|'s {{SubscriptionObserver/complete}} [=map/exists=], then set
500+
|internal observer|'s [=internal observer/complete steps=] to these steps:
499501

500502
1. [=Invoke=] |observer|'s {{SubscriptionObserver/complete}}.
501503

0 commit comments

Comments
 (0)