diff --git a/src/public/text-preprocessing.js b/src/public/text-preprocessing.js index 27202876..21d77acb 100644 --- a/src/public/text-preprocessing.js +++ b/src/public/text-preprocessing.js @@ -30,6 +30,6 @@ getLocalStorage(['textPreprocessingRegExpList', 'textPreprocessingPreset'], (opt textPreprocessingPreset = options.textPreprocessingPreset ?? {}; }); listenOptionsChange(['textPreprocessingRegExpList', 'textPreprocessingPreset'], (changes) => { - textPreprocessingRegExpList = changes.textPreprocessingRegExpList ?? []; - textPreprocessingPreset = changes.textPreprocessingPreset ?? {}; + 'textPreprocessingRegExpList' in changes && (textPreprocessingRegExpList = changes.textPreprocessingRegExpList ?? []); + 'textPreprocessingPreset' in changes && (textPreprocessingPreset = changes.textPreprocessingPreset ?? {}); }); \ No newline at end of file