Skip to content

Commit 5e65b3e

Browse files
committed
remove explicit nullability check
1 parent ea5f795 commit 5e65b3e

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/next/errors.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -707,5 +707,6 @@
707707
"706": "Invariant: static responses cannot be streamed %s",
708708
"707": "Invariant app-page handler received invalid cache entry %s",
709709
"708": "Failed to persist Chrome DevTools workspace UUID. The Chrome DevTools Workspace needs to be reconnected after the next page reload.",
710-
"709": "`rspack.getModuleNamedExports` is not supported by the wasm bindings."
710+
"709": "`rspack.getModuleNamedExports` is not supported by the wasm bindings.",
711+
"710": "cannot run loadNative when `NEXT_TEST_WASM` is set"
711712
}

packages/next/src/build/swc/index.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1077,6 +1077,7 @@ function bindingToApi(
10771077
}
10781078
}
10791079

1080+
// helper for tryLoadWasmWithFallback / loadBindings.
10801081
async function loadWasm(importPath = '') {
10811082
let attempts = []
10821083
let rawBindings: RawWasmBindings | null = null
@@ -1085,7 +1086,7 @@ async function loadWasm(importPath = '') {
10851086
// unstable and subject to change.
10861087
const testWasmDir = process.env.NEXT_TEST_WASM_DIR
10871088

1088-
if (testWasmDir != null) {
1089+
if (testWasmDir) {
10891090
// assume these are node.js bindings and don't need a call to `.default()`
10901091
rawBindings = await import(
10911092
pathToFileURL(path.join(testWasmDir, 'wasm.js')).toString()

0 commit comments

Comments
 (0)