mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
Fix type check
This commit is contained in:
1 file changed
+2
-2
@@ -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