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 {
44 SOURCEMAP_SEPARATE ,
55 SOURCEMAP_OFF ,
66 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
812} from '../containers/OptionsContainer' ;
913
1014const initialState = {
@@ -387,5 +391,17 @@ export const options = (state = initialState, action) => {
387391export function sanitizePersistedOptions ( persistedOptions ) {
388392 if ( ! Array . isArray ( persistedOptions . stringArrayEncoding ) ) {
389393 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+ }
390406 }
391407}
You can’t perform that action at this time.
0 commit comments