Skip to content

Commit 2262827

Browse files
committed
improved comment
1 parent 6aaa5bd commit 2262827

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

hooks/useLoadData/useLoadData.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,9 @@ function unboxApiResponse<T>(arg: ApiResponse<T> | T): T {
3232

3333
function isPromise<T>(promisable: Promisable<T>): promisable is Promise<T> {
3434
/*
35-
simply checking promisable instanceof Promise is not sufficient.
36-
Certain environments to not use native promises
35+
Simply checking promisable instanceof Promise is not sufficient.
36+
Certain environments do not use native promises. Checking for promisable
37+
to be thenable is a more comprehensive and conclusive test.
3738
*/
3839
return promisable && typeof promisable === 'object' && 'then' in promisable && typeof promisable.then === 'function';
3940
}

0 commit comments

Comments
 (0)