File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -5,10 +5,10 @@ export function blacklistKeys (blacklist?: Array<string>): ITransform {
55 const blacklistDict = arrToDict ( blacklist )
66
77 return { toStorage : function whitelistTransform ( snapshot ) {
8+ if ( ! blacklist ) { return snapshot }
9+
810 Object . keys ( snapshot ) . forEach ( ( key ) => {
9- if ( blacklist && blacklistDict [ key ] ) {
10- delete snapshot [ key ]
11- }
11+ if ( blacklistDict [ key ] ) { delete snapshot [ key ] }
1212 } )
1313 return snapshot
1414 } }
Original file line number Diff line number Diff line change @@ -5,10 +5,10 @@ export function whitelistKeys (whitelist?: Array<string>): ITransform {
55 const whitelistDict = arrToDict ( whitelist )
66
77 return { toStorage : function whitelistTransform ( snapshot ) {
8+ if ( ! whitelist ) { return snapshot }
9+
810 Object . keys ( snapshot ) . forEach ( ( key ) => {
9- if ( whitelist && ! whitelistDict [ key ] ) {
10- delete snapshot [ key ]
11- }
11+ if ( ! whitelistDict [ key ] ) { delete snapshot [ key ] }
1212 } )
1313 return snapshot
1414 } }
You can’t perform that action at this time.
0 commit comments