File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,11 @@ import {
4
4
SOURCEMAP_SEPARATE ,
5
5
SOURCEMAP_OFF ,
6
6
OPTIONS_PRESET_DEFAULT ,
7
- IDENTIFIER_NAMES_GENERATOR_HEXADECIMAL , TARGET_BROWSER , STRING_ARRAY_ENCODING_NONE
7
+ IDENTIFIER_NAMES_GENERATOR_HEXADECIMAL ,
8
+ TARGET_BROWSER ,
9
+ STRING_ARRAY_ENCODING_NONE ,
10
+ STRING_ARRAY_ENCODING_BASE64 ,
11
+ STRING_ARRAY_ENCODING_RC4
8
12
} from '../containers/OptionsContainer' ;
9
13
10
14
const initialState = {
@@ -387,5 +391,17 @@ export const options = (state = initialState, action) => {
387
391
export function sanitizePersistedOptions ( persistedOptions ) {
388
392
if ( ! Array . isArray ( persistedOptions . stringArrayEncoding ) ) {
389
393
persistedOptions . stringArrayEncoding = initialState . stringArrayEncoding ;
394
+ } else {
395
+ for ( const value of persistedOptions . stringArrayEncoding ) {
396
+ if (
397
+ value !== STRING_ARRAY_ENCODING_NONE
398
+ || value !== STRING_ARRAY_ENCODING_BASE64
399
+ || value !== STRING_ARRAY_ENCODING_RC4
400
+ ) {
401
+ persistedOptions . stringArrayEncoding = initialState . stringArrayEncoding ;
402
+
403
+ break ;
404
+ }
405
+ }
390
406
}
391
407
}
You can’t perform that action at this time.
0 commit comments