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 {
5
5
const blacklistDict = arrToDict ( blacklist )
6
6
7
7
return { toStorage : function whitelistTransform ( snapshot ) {
8
+ if ( ! blacklist ) { return snapshot }
9
+
8
10
Object . keys ( snapshot ) . forEach ( ( key ) => {
9
- if ( blacklist && blacklistDict [ key ] ) {
10
- delete snapshot [ key ]
11
- }
11
+ if ( blacklistDict [ key ] ) { delete snapshot [ key ] }
12
12
} )
13
13
return snapshot
14
14
} }
Original file line number Diff line number Diff line change @@ -5,10 +5,10 @@ export function whitelistKeys (whitelist?: Array<string>): ITransform {
5
5
const whitelistDict = arrToDict ( whitelist )
6
6
7
7
return { toStorage : function whitelistTransform ( snapshot ) {
8
+ if ( ! whitelist ) { return snapshot }
9
+
8
10
Object . keys ( snapshot ) . forEach ( ( key ) => {
9
- if ( whitelist && ! whitelistDict [ key ] ) {
10
- delete snapshot [ key ]
11
- }
11
+ if ( ! whitelistDict [ key ] ) { delete snapshot [ key ] }
12
12
} )
13
13
return snapshot
14
14
} }
You can’t perform that action at this time.
0 commit comments