Skip to content

Commit

Permalink
fix: debug error
Browse files Browse the repository at this point in the history
  • Loading branch information
fupengl committed Jul 26, 2022
1 parent 03fd1d1 commit 864b3e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/debug.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export function ensure(condition: boolean, msg: string): asserts condition {
* @return fn 如果fn是函数,则返回函数,否则报错
*/
export function ensureCallable<T extends Function = any>(fn: any): T {
if (isFunction(fn)) throw new TypeError(fn + ' is not a function');
if (!isFunction(fn)) throw new TypeError(fn + ' is not a function');
return fn;
}

Expand Down

0 comments on commit 864b3e1

Please sign in to comment.