fix(cli): handle case where 'toString' is a schema field

This commit is contained in:
Ruben Fiszel
2024-10-11 12:28:40 +02:00
parent b603f4a6ba
commit fdfcea3cc8
+4 -1
View File
@@ -55,7 +55,10 @@ export function deepEqual<T>(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();
}