We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2b8178d commit 11c0864Copy full SHA for 11c0864
modules/store/src/meta-reducers/immutability_reducer.ts
@@ -20,16 +20,20 @@ function freeze(target: any) {
20
const targetIsFunction = isFunction(target);
21
22
Object.getOwnPropertyNames(target).forEach(prop => {
23
- const propValue = target[prop];
24
if (
25
hasOwnProperty(target, prop) &&
26
(targetIsFunction
27
? prop !== 'caller' && prop !== 'callee' && prop !== 'arguments'
28
- : true) &&
29
- (isObjectLike(propValue) || isFunction(propValue)) &&
30
- !Object.isFrozen(propValue)
+ : true)
31
) {
32
- freeze(propValue);
+ const propValue = target[prop];
+
+ if (
+ (isObjectLike(propValue) || isFunction(propValue)) &&
33
+ !Object.isFrozen(propValue)
34
+ ) {
35
+ freeze(propValue);
36
+ }
37
}
38
});
39
0 commit comments