1
0
mirror of https://github.com/node-red/node-red.git synced 2023-10-10 13:36:53 +02:00

Storage object null when adding twitter credentials as first ever node

This commit is contained in:
Nicholas O'Leary 2013-11-22 13:53:34 +00:00
parent 1967046cc8
commit 3054b04378

View File

@ -207,6 +207,10 @@ var credentials = {};
module.exports.addCredentials = function(id,creds) {
credentials[id] = creds;
if (!storage) {
// Do this lazily to ensure the storage provider as been initialised
storage = require("./storage");
}
storage.saveCredentials(credentials);
}
module.exports.getCredentials = function(id) {