Skip to content

Commit 27b315c

Browse files
committed
feat: lowercase
1 parent fb1b2d5 commit 27b315c

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

src/commands/push.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -261,10 +261,7 @@ async function removeCustomTypeWithDocumentHandling(
261261
}
262262

263263
function isDocumentsInUseError(error: unknown): error is BadRequestError {
264-
if (!(error instanceof BadRequestError)) return false;
265-
const { body } = error;
266-
return (
267-
typeof body === "string" &&
268-
(body.includes("associated documents") || body.includes("Delete all documents belonging"))
269-
);
264+
if (!(error instanceof BadRequestError) || typeof error.body !== "string") return false;
265+
const body = error.body.toString();
266+
return body.includes("associated documents") || body.includes("Delete all documents belonging");
270267
}

0 commit comments

Comments
 (0)