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
90f62e5e4a
commit
f4d4bf8779
11
packages/node_modules/node-red/red.js
vendored
11
packages/node_modules/node-red/red.js
vendored
@ -169,16 +169,7 @@ httpsPromise.then(function(startupHttps) {
|
||||
setInterval(function () {
|
||||
try {
|
||||
// Get the result of the function, because createServer doesn't accept functions as input
|
||||
var refreshedHttps = settings.https();
|
||||
|
||||
var httpsPromise;
|
||||
if (refreshedHttps.hasOwnProperty('then') && typeof refreshedHttps.then === 'function') {
|
||||
// A promise was returned
|
||||
httpsPromise = refreshedHttps;
|
||||
} else {
|
||||
// An object was returned - wrap in a promise
|
||||
httpsPromise = Promise.resolve(refreshedHttps);
|
||||
}
|
||||
var httpsPromise = Promise.resolve(settings.https());
|
||||
|
||||
httpsPromise.then(function(refreshedHttps) {
|
||||
// Use the refreshed https settings
|
||||
|
Loading…
Reference in New Issue
Block a user