mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Update packages/node_modules/node-red/red.js
Co-authored-by: Nick O'Leary <nick.oleary@gmail.com>
This commit is contained in:
parent
bfa5f39b6d
commit
90f62e5e4a
7
packages/node_modules/node-red/red.js
vendored
7
packages/node_modules/node-red/red.js
vendored
@ -150,15 +150,8 @@ if (settings.https) {
|
|||||||
// Get the result of the function, because createServer doesn't accept functions as input
|
// Get the result of the function, because createServer doesn't accept functions as input
|
||||||
startupHttps = startupHttps();
|
startupHttps = startupHttps();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (startupHttps.hasOwnProperty('then') && typeof startupHttps.then === 'function') {
|
|
||||||
// A promise was returned
|
|
||||||
httpsPromise = startupHttps;
|
|
||||||
} else {
|
|
||||||
// An object was returned - wrap in a promise
|
|
||||||
httpsPromise = Promise.resolve(startupHttps);
|
httpsPromise = Promise.resolve(startupHttps);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else {
|
else {
|
||||||
// No https is enable - wrap null
|
// No https is enable - wrap null
|
||||||
httpsPromise = Promise.resolve(null);
|
httpsPromise = Promise.resolve(null);
|
||||||
|
Loading…
Reference in New Issue
Block a user