1
0
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:
Aaron Piotrowski 2016-08-23 13:18:56 -05:00
parent 6e1c1db5a6
commit f46912d387

View File

@ -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");
}