diff --git a/lib/routes/bilibili/wasm-exec.ts b/lib/routes/bilibili/wasm-exec.ts index 0fa21391b..909eed76f 100644 --- a/lib/routes/bilibili/wasm-exec.ts +++ b/lib/routes/bilibili/wasm-exec.ts @@ -147,7 +147,7 @@ }; } - // eslint-disable-next-line n/no-unsupported-features/node-builtins + if (!globalThis.crypto) { throw new Error('globalThis.crypto is not available, polyfill required (crypto.getRandomValues only)'); } @@ -373,7 +373,7 @@ // func getRandomData(r []byte) 'runtime.getRandomData': (sp) => { sp >>>= 0; - // eslint-disable-next-line n/no-unsupported-features/node-builtins + crypto.getRandomValues(loadSlice(sp + 8)); },