From 89174aebe2785ce60e0aec4599bac6f4638297cb Mon Sep 17 00:00:00 2001 From: benji7425 Date: Mon, 11 Sep 2017 17:58:30 +0100 Subject: [PATCH] Fix runtime issue when starting up without any data --- app/models/guild-data.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/guild-data.js b/app/models/guild-data.js index d1ea352..17bb793 100644 --- a/app/models/guild-data.js +++ b/app/models/guild-data.js @@ -4,7 +4,7 @@ const Util = require("discordjs-util"); module.exports = class GuildData { constructor({ id, feeds }) { this.id = id; - this.feeds = feeds.map(feed => new FeedData(feed)); + this.feeds = (feeds || []).map(feed => new FeedData(feed)); } cachePastPostedLinks(guild) {