Skip to content

Commit 4096713

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

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/ts/helpers/parse.ts

Lines changed: 1 addition & 1 deletion
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)