Browse Source

fixed deepFreezeAndThrowOnMutationInDev

Daniel Zlotin 8 years ago
parent
commit
0863bff91d

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

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

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

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