diff --git a/src/Promise.php b/src/Promise.php index ead3106e..aa8d914e 100644 --- a/src/Promise.php +++ b/src/Promise.php @@ -25,6 +25,10 @@ public function then(callable $onFulfilled = null, callable $onRejected = null, return $this->result->then($onFulfilled, $onRejected, $onProgress); } + if (null === $this->canceller) { + return new static($this->resolver($onFulfilled, $onRejected, $onProgress)); + } + $this->requiredCancelRequests++; return new static($this->resolver($onFulfilled, $onRejected, $onProgress), function ($resolve, $reject, $progress) {