Skip to content

Commit

Permalink
Apply suggestions from review
Browse files Browse the repository at this point in the history
  • Loading branch information
NiklasMerz committed Apr 22, 2021
1 parent 3a487fd commit 69da7ab
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions framework/src/org/apache/cordova/ConfigXmlParser.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Licensed to the Apache Software Foundation (ASF) under one
public class ConfigXmlParser {
private static String TAG = "ConfigXmlParser";

private String launchUrl = "https://localhost/";
private String launchUrl = null;
private CordovaPreferences prefs = new CordovaPreferences();
private ArrayList<PluginEntry> pluginEntries = new ArrayList<PluginEntry>(20);

Expand All @@ -46,7 +46,9 @@ public ArrayList<PluginEntry> getPluginEntries() {
}

public String getLaunchUrl() {
launchUrl = "https://" + this.prefs.getString("hostname", "localhost");
if (launchUrl == null) {
launchUrl = "https://" + this.prefs.getString("hostname", "localhost");
}
return launchUrl;
}

Expand Down Expand Up @@ -140,7 +142,7 @@ private void setStartUrl(String src) {
if (src.charAt(0) == '/') {
src = src.substring(1);
}
launchUrl = "https://localhost/" + src;
launchUrl = "https://" + this.prefs.getString("hostname", "localhost") + "/" + src;
}
}
}

0 comments on commit 69da7ab

Please sign in to comment.