From f95412770becc1bdd21b18efcf3e1216ed8aac55 Mon Sep 17 00:00:00 2001 From: Aaron Piotrowski Date: Mon, 14 Nov 2016 14:10:44 -0600 Subject: [PATCH] Lazy promise bugfix --- lib/Internal/LazyPromise.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Internal/LazyPromise.php b/lib/Internal/LazyPromise.php index 54c72bf..f1ee791 100644 --- a/lib/Internal/LazyPromise.php +++ b/lib/Internal/LazyPromise.php @@ -35,7 +35,7 @@ class LazyPromise implements Promise { try { $this->promise = $provider(); - if ($this->promise instanceof Promise) { + if (!$this->promise instanceof Promise) { $this->promise = new Success($this->promise); } } catch (\Throwable $exception) {