Skip to content

Commit

Permalink
fix isPromiseLike
Browse files Browse the repository at this point in the history
  • Loading branch information
moshest committed Nov 24, 2020
1 parent 87a711b commit 37e6400
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/schema/utils.ts
Expand Up @@ -99,7 +99,7 @@ export function typeCheck<T, R, Y = 'ok' extends T ? never : 'ok'>(
}

export function isPromiseLike(value: unknown): value is PromiseLike<unknown> {
return value && typeof (value as PromiseLike<unknown>).then === 'function';
return !!value && typeof (value as PromiseLike<unknown>).then === 'function';
}

export function isPrimitive(value: unknown): value is Primitive {
Expand Down

0 comments on commit 37e6400

Please sign in to comment.