Skip to content

Commit b4d2182

Browse files
carlopiMytherin
authored andcommitted
Fixup FileFlags condition
1 parent 58fcb9a commit b4d2182

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/duckdb-wasm/src/bindings/runtime_browser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ export const BROWSER_RUNTIME: DuckDBRuntime & {
152152
mod.HEAPF64[(result >> 3) + 0] = 1;
153153
mod.HEAPF64[(result >> 3) + 1] = data;
154154
return result;
155-
} else if (flags != FileFlags.FILE_FLAGS_READ) {
155+
} else if ((flags & FileFlags.FILE_FLAGS_READ) == 0) {
156156
throw new Error(`Opening file ${file.fileName} failed: unsupported file flags: ${flags}`);
157157
}
158158

0 commit comments

Comments
 (0)