Skip to content
This repository was archived by the owner on Feb 26, 2024. It is now read-only.

Commit 11caeb8

Browse files
committed
fix(wrapper): avoid frozen object issue
1 parent d183ce4 commit 11caeb8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/wrapper/wrapper_impl.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,14 +125,14 @@ export class ReactNativeWrapperImpl extends ReactNativeWrapper {
125125
var tag = ReactNativeTagHandles.allocateTag();
126126
var viewName = RCT_VIEW_NAMES[tagName] || RCT_VIEW_NAMES['native-view'];
127127
this.$log(`Creating a ${viewName} with tag ${tag} and attribs:`, properties);
128-
UIManager.createView(tag, viewName, 1, properties);
128+
UIManager.createView(tag, viewName, 1, JSON.parse(JSON.stringify(properties)));
129129
return tag;
130130
}
131131

132132
updateView(tag: number, tagName: string, properties: Object) {
133133
var viewName = RCT_VIEW_NAMES[tagName] || RCT_VIEW_NAMES['native-view'];
134134
this.$log(`Updating property ${viewName} in ${tag} to`, properties);
135-
UIManager.updateView(tag, viewName, properties);
135+
UIManager.updateView(tag, viewName, JSON.parse(JSON.stringify(properties)));
136136
}
137137

138138
manageChildren(parentTag: number, moveFrom: Array<number>, moveTo: Array<number>, addTags: Array<number>, addAt: Array<number>, removeAt: Array<number>) {

0 commit comments

Comments
 (0)