fixed bug when tunnel tokens not defined in config

This commit is contained in:
tigerbot 2017-07-31 18:35:49 -06:00
parent 363620d7fb
commit 3bd9bac390
1 changed files with 14 additions and 11 deletions

View File

@ -173,6 +173,7 @@ module.exports.create = function (deps, config) {
return activeTunnels[data.tunnelUrl].clear(data.jwt);
}
if (config.tunnel) {
var confTokens = config.tunnel;
if (typeof confTokens === 'string') {
confTokens = confTokens.split(',');
@ -185,6 +186,8 @@ module.exports.create = function (deps, config) {
addToken({ jwt: jwt, owner: 'config' });
}
});
}
storage.all().then(function (stored) {
stored.forEach(function (result) {