mirror of
https://github.com/node-red/node-red.git
synced 2025-03-01 10:36:34 +00:00
Guard settings access
This commit is contained in:
parent
50627cd697
commit
d876146ea5
@ -136,10 +136,12 @@ function start() {
|
|||||||
.then(function() { return settings.load(storage)})
|
.then(function() { return settings.load(storage)})
|
||||||
.then(function() { return library.init(runtime)})
|
.then(function() { return library.init(runtime)})
|
||||||
.then(function() {
|
.then(function() {
|
||||||
if (settings.get('instanceId') === undefined) {
|
if (settings.available()) {
|
||||||
settings.set('instanceId', crypto.randomBytes(8).toString('hex'))
|
if (settings.get('instanceId') === undefined) {
|
||||||
|
settings.set('instanceId', crypto.randomBytes(8).toString('hex'))
|
||||||
|
}
|
||||||
|
userSettings.instanceId = settings.get('instanceId') || ''
|
||||||
}
|
}
|
||||||
userSettings.instanceId = settings.get('instanceId') || ''
|
|
||||||
if (log.metric()) {
|
if (log.metric()) {
|
||||||
runtimeMetricInterval = setInterval(function() {
|
runtimeMetricInterval = setInterval(function() {
|
||||||
reportMetrics();
|
reportMetrics();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user