Skip to content

Commit 66518a2

Browse files
committed
Use typeof vs instanceof to detect functions
1 parent b07ab7c commit 66518a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src_client/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,7 @@ export function msg(
240240
template = localized;
241241
}
242242
}
243-
if (template instanceof Function) {
243+
if (typeof template === 'function') {
244244
return template(...params);
245245
}
246246
return template;

0 commit comments

Comments
 (0)