mirror of
https://github.com/danog/amp.git
synced 2024-11-27 04:24:42 +01:00
Fix bug on null emits
This commit is contained in:
parent
6e1c1db5a6
commit
f46912d387
@ -110,7 +110,7 @@ class Observer {
|
||||
|
||||
++$this->position;
|
||||
|
||||
if (isset($this->values[$this->position])) {
|
||||
if (\array_key_exists($this->position, $this->values)) {
|
||||
return new Success(true);
|
||||
}
|
||||
|
||||
@ -140,7 +140,7 @@ class Observer {
|
||||
throw new \Error("The observable has resolved");
|
||||
}
|
||||
|
||||
if (!isset($this->values[$this->position])) {
|
||||
if (!\array_key_exists($this->position, $this->values)) {
|
||||
throw new \Error("Awaitable returned from next() must resolve before calling this method");
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user