1
0
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:
Hideki Nakamura 2017-12-06 22:19:07 +09:00 committed by Nick O'Leary
parent d78916f85f
commit 1dd4323613

View File

@ -78,7 +78,7 @@ var api = module.exports = {
var projectKey = false;
var activeProject;
if (runtime.storage.projects) {
if (runtime.storage && runtime.storage.projects) {
// projects enabled
activeProject = runtime.storage.projects.getActiveProject();
if (activeProject) {
@ -199,8 +199,10 @@ var api = module.exports = {
}
if (clearInvalidFlag) {
// TODO: this delves too deep into Project structure
if (activeProject) {
delete activeProject.credentialSecretInvalid;
}
}
});
},