File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -55,11 +55,13 @@ export async function loadWasmBinary(
5555
5656// Text file read threshold - configurable via ENV, -1 to disable
5757const DEFAULT_TEXT_FILE_READ_THRESHOLD_BYTES = 512 * 1024 ; // 512 KiB
58- const TEXT_FILE_READ_THRESHOLD_BYTES = parseInt (
59- process . env [ 'GEMINI_TEXT_FILE_READ_THRESHOLD_BYTES' ] ||
60- String ( DEFAULT_TEXT_FILE_READ_THRESHOLD_BYTES ) ,
58+ const parsedThreshold = parseInt (
59+ process . env [ 'GEMINI_TEXT_FILE_READ_THRESHOLD_BYTES' ] ?? 'not-a-number' ,
6160 10 ,
6261) ;
62+ const TEXT_FILE_READ_THRESHOLD_BYTES = isNaN ( parsedThreshold )
63+ ? DEFAULT_TEXT_FILE_READ_THRESHOLD_BYTES
64+ : parsedThreshold ;
6365
6466// Default values for encoding and separator format
6567export const DEFAULT_ENCODING : BufferEncoding = 'utf-8' ;
You can’t perform that action at this time.
0 commit comments