We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6aaa5bd commit 2262827Copy full SHA for 2262827
hooks/useLoadData/useLoadData.ts
@@ -32,8 +32,9 @@ function unboxApiResponse<T>(arg: ApiResponse<T> | T): T {
32
33
function isPromise<T>(promisable: Promisable<T>): promisable is Promise<T> {
34
/*
35
- simply checking promisable instanceof Promise is not sufficient.
36
- Certain environments to not use native promises
+ Simply checking promisable instanceof Promise is not sufficient.
+ Certain environments do not use native promises. Checking for promisable
37
+ to be thenable is a more comprehensive and conclusive test.
38
*/
39
return promisable && typeof promisable === 'object' && 'then' in promisable && typeof promisable.then === 'function';
40
}
0 commit comments