From fdfcea3cc830a360a4862468e360b093a59a9645 Mon Sep 17 00:00:00 2001 From: Ruben Fiszel Date: Fri, 11 Oct 2024 12:28:40 +0200 Subject: [PATCH] fix(cli): handle case where 'toString' is a schema field --- cli/utils.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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(); }