Skip to content

Commit 3a1a0d1

Browse files
golopotljharb
andauthored
Apply suggestion: replace mutation with Object.assign
Co-Authored-By: Jordan Harband <[email protected]>
1 parent 89b8143 commit 3a1a0d1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/util/usedPropTypes.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ function createPropVariables() {
3939
if (!hasBeenWritten) {
4040
// copy on write
4141
propVariables = new Map(propVariables);
42-
stack[stack.length - 1].propVariables = propVariables;
42+
Object.assign(stack[stack.length - 1], { propVariables, hasBeenWritten: true });
4343
stack[stack.length - 1].hasBeenWritten = true;
4444
}
4545
return propVariables.set(name, allNames);

0 commit comments

Comments
 (0)