Browse Source

fixed deepFreezeAndThrowOnMutationInDev

Daniel Zlotin 8 years ago
parent
commit
0863bff91d

+ 2
- 2
src/deprecated/platformSpecificDeprecated.android.js View File

@@ -59,7 +59,7 @@ function navigatorPush(navigator, params) {
59 59
   let adapted = adaptNavigationStyleToScreenStyle(params);
60 60
   adapted = adaptNavigationParams(adapted);
61 61
   adapted.overrideBackPress = params.overrideBackPress;
62
-  
62
+
63 63
   newPlatformSpecific.push(adapted);
64 64
 }
65 65
 
@@ -351,7 +351,7 @@ function addNavigatorParams(screen, navigator = null, idx = '') {
351 351
 
352 352
 function addNavigatorButtons(screen, sideMenuParams) {
353 353
   const Screen = Navigation.getRegisteredScreen(screen.screen);
354
-  Object.assign(screen, Screen.navigatorButtons);
354
+  screen.navigatorButtons = _.cloneDeep(Screen.navigatorButtons);
355 355
 
356 356
   // Get image uri from image id
357 357
   const rightButtons = getRightButtons(screen);

+ 3
- 3
src/deprecated/platformSpecificDeprecated.ios.js View File

@@ -185,9 +185,9 @@ function _mergeScreenSpecificSettings(screenID, screenInstanceID, params) {
185 185
   }
186 186
 
187 187
   let navigatorEventID = screenInstanceID + '_events';
188
-  let navigatorButtons = JSON.parse(JSON.stringify(screenClass.navigatorButtons));
188
+  let navigatorButtons = _.cloneDeep(screenClass.navigatorButtons);
189 189
   if (params.navigatorButtons) {
190
-    navigatorButtons = JSON.parse(JSON.stringify(params.navigatorButtons));
190
+    navigatorButtons = _.cloneDeep(params.navigatorButtons);
191 191
   }
192 192
   if (navigatorButtons.leftButtons) {
193 193
     for (let i = 0; i < navigatorButtons.leftButtons.length; i++) {
@@ -230,7 +230,7 @@ function navigatorPush(navigator, params) {
230 230
 
231 231
   Controllers.NavigationControllerIOS(navigator.navigatorID).push({
232 232
     title: params.title,
233
-    subtitle:params.subtitle,
233
+    subtitle: params.subtitle,
234 234
     titleImage: params.titleImage,
235 235
     component: params.screen,
236 236
     animated: params.animated,