Fix runtime issue when starting up without any data

This commit is contained in:
benji7425 2017-09-11 17:58:30 +01:00
parent 03155598c2
commit 89174aebe2

View file

@ -4,7 +4,7 @@ const Util = require("discordjs-util");
module.exports = class GuildData { module.exports = class GuildData {
constructor({ id, feeds }) { constructor({ id, feeds }) {
this.id = id; this.id = id;
this.feeds = feeds.map(feed => new FeedData(feed)); this.feeds = (feeds || []).map(feed => new FeedData(feed));
} }
cachePastPostedLinks(guild) { cachePastPostedLinks(guild) {