mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Fix type check
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user