1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-25 23:03:15 +00:00

Server: Avoid displaying "undefined" for missing path prefix

This commit is contained in:
Jermolene 2019-03-01 18:28:51 +00:00
parent 18c00c2ef0
commit 655fc31cee

View File

@ -239,7 +239,7 @@ Server.prototype.listen = function(port,host,prefix) {
// Handle defaults for port and host // Handle defaults for port and host
port = port || this.get("port"); port = port || this.get("port");
host = host || this.get("host"); host = host || this.get("host");
prefix = prefix || this.get("path-prefix"); prefix = prefix || this.get("path-prefix") || "";
// Check for the port being a string and look it up as an environment variable // Check for the port being a string and look it up as an environment variable
if(parseInt(port,10).toString() !== port) { if(parseInt(port,10).toString() !== port) {
port = process.env[port] || 8080; port = process.env[port] || 8080;