File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,13 @@ module.exports = () => {
39
39
}
40
40
41
41
// 2. Modify jsCodeLocation value assignment
42
- var oldJsCodeLocationAssignmentStatement = appDelegateContents . match ( / ( j s C o d e L o c a t i o n = .* ) / ) [ 1 ] ;
42
+ var jsCodeLocations = appDelegateContents . match ( / ( j s C o d e L o c a t i o n = .* ) / ) ;
43
+ var oldJsCodeLocationAssignmentStatement ;
44
+ if ( jsCodeLocations ) {
45
+ oldJsCodeLocationAssignmentStatement = jsCodeLocations [ 1 ] ;
46
+ } else {
47
+ console . log ( 'Couldn\'t find jsCodeLocation setting in AppDelegate.' ) ;
48
+ }
43
49
var newJsCodeLocationAssignmentStatement = "jsCodeLocation = [CodePush bundleURL];" ;
44
50
if ( ~ appDelegateContents . indexOf ( newJsCodeLocationAssignmentStatement ) ) {
45
51
console . log ( `"jsCodeLocation" already pointing to "[CodePush bundleURL]".` ) ;
You can’t perform that action at this time.
0 commit comments