Browse Source

- Fixes freeze of passProps on iOS (#3220)

pera 6 years ago
parent
commit
fa135e223b
1 changed files with 13 additions and 13 deletions
  1. 13
    13
      src/deprecated/platformSpecificDeprecated.ios.js

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

@@ -38,7 +38,7 @@ async function startTabBasedApp(params) {
38 38
 
39 39
       components.forEach(component => {
40 40
         const screenInstanceID = _.uniqueId('screenInstanceID');
41
-  
41
+
42 42
         const {
43 43
           navigatorStyle,
44 44
           navigatorButtons,
@@ -46,12 +46,12 @@ async function startTabBasedApp(params) {
46 46
         } = _mergeScreenSpecificSettings(component.screen, screenInstanceID, params);
47 47
         _saveNavigatorButtonsProps(navigatorButtons);
48 48
         _saveNavBarComponentProps(navigatorStyle);
49
-        const passProps = Object.assign({}, component.passProps);
49
+        const passProps = _.cloneDeep(component.passProps);
50 50
         passProps.navigatorID = navigatorID;
51 51
         passProps.screenInstanceID = screenInstanceID;
52 52
         passProps.navigatorEventID = navigatorEventID;
53
-  
54
-  
53
+
54
+
55 55
         component.navigationParams = {
56 56
           screenInstanceID,
57 57
           navigatorStyle,
@@ -60,15 +60,15 @@ async function startTabBasedApp(params) {
60 60
           navigatorID: navigatorID,
61 61
           passProps
62 62
         };
63
-  
63
+
64 64
         component.subtitle = params.subtitle;
65 65
         component.passProps = passProps;
66 66
         component.navigatorStyle = navigatorStyle;
67 67
 
68 68
         savePassProps(component);
69
-  
69
+
70 70
       });
71
-        
71
+
72 72
     }
73 73
 
74 74
     const {
@@ -191,7 +191,7 @@ async function startSingleScreenApp(params) {
191 191
       } = _mergeScreenSpecificSettings(component.screen, screenInstanceID, params);
192 192
       _saveNavigatorButtonsProps(navigatorButtons);
193 193
       _saveNavBarComponentProps(navigatorStyle);
194
-      const passProps = Object.assign({}, params.passProps);
194
+      const passProps = _.cloneDeep(params.passProps);
195 195
       passProps.navigatorID = navigatorID;
196 196
       passProps.screenInstanceID = screenInstanceID;
197 197
       passProps.navigatorEventID = navigatorEventID;
@@ -340,7 +340,7 @@ function navigatorPush(navigator, params) {
340 340
   } = _mergeScreenSpecificSettings(params.screen, screenInstanceID, params);
341 341
   _saveNavigatorButtonsProps(navigatorButtons);
342 342
   _saveNavBarComponentProps(navigatorStyle);
343
-  const passProps = Object.assign({}, params.passProps);
343
+  const passProps = _.cloneDeep(params);
344 344
   passProps.navigatorID = navigator.navigatorID;
345 345
   passProps.screenInstanceID = screenInstanceID;
346 346
   passProps.navigatorEventID = navigatorEventID;
@@ -406,7 +406,7 @@ function navigatorResetTo(navigator, params) {
406 406
   } = _mergeScreenSpecificSettings(params.screen, screenInstanceID, params);
407 407
   _saveNavigatorButtonsProps(navigatorButtons);
408 408
   _saveNavBarComponentProps(navigatorStyle);
409
-  const passProps = Object.assign({}, params.passProps);
409
+  const passProps = _.cloneDeep(params.passProps);
410 410
   passProps.navigatorID = navigator.navigatorID;
411 411
   passProps.screenInstanceID = screenInstanceID;
412 412
   passProps.navigatorEventID = navigatorEventID;
@@ -590,7 +590,7 @@ function showModal(params) {
590 590
   } = _mergeScreenSpecificSettings(params.screen, screenInstanceID, params);
591 591
   _saveNavigatorButtonsProps(navigatorButtons);
592 592
   _saveNavBarComponentProps(navigatorStyle);
593
-  const passProps = Object.assign({}, params.passProps);
593
+  const passProps = _.cloneDeep(params.passProps);
594 594
   passProps.navigatorID = navigatorID;
595 595
   passProps.screenInstanceID = screenInstanceID;
596 596
   passProps.navigatorEventID = navigatorEventID;
@@ -648,7 +648,7 @@ function showLightBox(params) {
648 648
     navigatorButtons,
649 649
     navigatorEventID
650 650
   } = _mergeScreenSpecificSettings(params.screen, screenInstanceID, params);
651
-  const passProps = Object.assign({}, params.passProps);
651
+  const passProps = _.cloneDeep(params.passProps);
652 652
   passProps.navigatorID = navigatorID;
653 653
   passProps.screenInstanceID = screenInstanceID;
654 654
   passProps.navigatorEventID = navigatorEventID;
@@ -688,7 +688,7 @@ function showInAppNotification(params) {
688 688
     navigatorButtons,
689 689
     navigatorEventID
690 690
   } = _mergeScreenSpecificSettings(params.screen, screenInstanceID, params);
691
-  const passProps = Object.assign({}, params.passProps);
691
+  const passProps = _.cloneDeep(params.passProps);
692 692
   passProps.navigatorID = navigatorID;
693 693
   passProps.screenInstanceID = screenInstanceID;
694 694
   passProps.navigatorEventID = navigatorEventID;