Skip to content

Commit

Permalink
fail safe
Browse files Browse the repository at this point in the history
  • Loading branch information
skarab42 committed Nov 27, 2020
1 parent 2aa0c89 commit 370e54b
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions app/server/libs/twitch/plugins/install.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,13 @@ const { isFirstStart } = require("../../../../utils");
const streamStatePlugin = require("./streamState");
const followsPlugin = require("./followsPlugin");

module.exports = async function install() {
if (isFirstStart) {
await updateFollowsPlugin();
let lock = false;

module.exports = function install() {
if (isFirstStart && !lock) {
updateFollowsPlugin();
lock = true;
}
await streamStatePlugin();
await followsPlugin();
streamStatePlugin();
followsPlugin();
};

0 comments on commit 370e54b

Please sign in to comment.