mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
Fix type check
This commit is contained in:
parent
4a2b620611
commit
e79343bae7
1 changed files with 2 additions and 2 deletions
|
|
@ -11,12 +11,12 @@ class CoroutinePromiseAdapter implements PromiseAdapter
|
|||
{
|
||||
public function isThenable($value): bool
|
||||
{
|
||||
return $value instanceof Promise;
|
||||
return $value instanceof CoroutinePromise;
|
||||
}
|
||||
|
||||
public function convertThenable($thenable): Promise
|
||||
{
|
||||
if (!$thenable instanceof Promise) {
|
||||
if (!$thenable instanceof CoroutinePromise) {
|
||||
throw new InvariantViolation('Expected instance of SwoolePromise, got ' . Utils::printSafe($thenable));
|
||||
}
|
||||
return new Promise($thenable, $this);
|
||||
|
|
|
|||
Loading…
Reference in a new issue