Skip to content

Commit 3ccfa67

Browse files
lughinoRichard Hua
authored andcommitted
Fix failure in react-native link on Windows (microsoft#603)
Fix issue microsoft#530. Every so often you run the command react-native link an exception is thrown because the \n in regex does not lead to the line.
1 parent ae0d352 commit 3ccfa67

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

scripts/postlink/ios/postlink.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ if (~appDelegateContents.indexOf(codePushHeaderImportStatement)) {
3131
}
3232

3333
// 2. Modify jsCodeLocation value assignment
34-
var oldJsCodeLocationAssignmentStatement = appDelegateContents.match(/(jsCodeLocation = .*)\n/)[1];
34+
var oldJsCodeLocationAssignmentStatement = appDelegateContents.match(/(jsCodeLocation = .*)/)[1];
3535
var newJsCodeLocationAssignmentStatement = "jsCodeLocation = [CodePush bundleURL];";
3636
if (~appDelegateContents.indexOf(newJsCodeLocationAssignmentStatement)) {
3737
console.log(`"jsCodeLocation" already pointing to "[CodePush bundleURL]".`);

0 commit comments

Comments
 (0)