Skip to content

Commit b47fe7a

Browse files
authored
fix(memory-wiki): avoid implicit error coercion (#99307)
1 parent 591d099 commit b47fe7a

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

extensions/memory-wiki/src/ingest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ function assertUtf8Text(buffer: Buffer, sourcePath: string): string {
4242

4343
function isEmptyExistingSourcePage(error: unknown): boolean {
4444
return (
45-
!!error &&
4645
typeof error === "object" &&
46+
error !== null &&
4747
((error as NodeJS.ErrnoException).code === "ENOENT" ||
4848
(error as NodeJS.ErrnoException).code === "EISDIR")
4949
);

0 commit comments

Comments
 (0)