mirror of
https://github.com/danog/amp.git
synced 2024-11-27 04:24:42 +01:00
Lazy promise bugfix
This commit is contained in:
parent
9927ad5b4f
commit
f95412770b
@ -35,7 +35,7 @@ class LazyPromise implements Promise {
|
|||||||
try {
|
try {
|
||||||
$this->promise = $provider();
|
$this->promise = $provider();
|
||||||
|
|
||||||
if ($this->promise instanceof Promise) {
|
if (!$this->promise instanceof Promise) {
|
||||||
$this->promise = new Success($this->promise);
|
$this->promise = new Success($this->promise);
|
||||||
}
|
}
|
||||||
} catch (\Throwable $exception) {
|
} catch (\Throwable $exception) {
|
||||||
|
Loading…
Reference in New Issue
Block a user