mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Fix the errors in credentials test cases (#1512)
This commit is contained in:
parent
d78916f85f
commit
1dd4323613
@ -78,7 +78,7 @@ var api = module.exports = {
|
|||||||
|
|
||||||
var projectKey = false;
|
var projectKey = false;
|
||||||
var activeProject;
|
var activeProject;
|
||||||
if (runtime.storage.projects) {
|
if (runtime.storage && runtime.storage.projects) {
|
||||||
// projects enabled
|
// projects enabled
|
||||||
activeProject = runtime.storage.projects.getActiveProject();
|
activeProject = runtime.storage.projects.getActiveProject();
|
||||||
if (activeProject) {
|
if (activeProject) {
|
||||||
@ -199,7 +199,9 @@ var api = module.exports = {
|
|||||||
}
|
}
|
||||||
if (clearInvalidFlag) {
|
if (clearInvalidFlag) {
|
||||||
// TODO: this delves too deep into Project structure
|
// TODO: this delves too deep into Project structure
|
||||||
delete activeProject.credentialSecretInvalid;
|
if (activeProject) {
|
||||||
|
delete activeProject.credentialSecretInvalid;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user