diff --git a/cli/utils.ts b/cli/utils.ts index 5f2de77f6b..fcb07bea9e 100644 --- a/cli/utils.ts +++ b/cli/utils.ts @@ -55,7 +55,10 @@ export function deepEqual(a: T, b: T): boolean { if (a.valueOf !== Object.prototype.valueOf) { return a.valueOf() === b.valueOf(); } - if (a.toString !== Object.prototype.toString) { + if ( + a.toString !== Object.prototype.toString && + typeof a.toString == "function" + ) { return a.toString() === b.toString(); }