Skip to content

Commit 4096713

Browse files
committed
fix: toString broken
closes: #276
1 parent f01f328 commit 4096713

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Diff for: src/ts/helpers/parse.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export function parseAndFormat<S, T>(input: S | undefined,
2626
}
2727

2828
function toString<T>(source: T): string {
29-
if ("toString" in source && typeof (source as {toString: () => string}) === "function") {
29+
if (source["toString"] && typeof source["toString"] === "function") {
3030
return (source as {toString: () => string}).toString();
3131
} else {
3232
throw TypeError(`Can't convert type ${typeof source} to string`);

0 commit comments

Comments
 (0)