Validate that we have a rooms array when modifying feeds

This commit is contained in:
Travis Ralston 2018-03-31 22:21:06 -06:00
parent b47693561f
commit 43460eef7f

View file

@ -200,6 +200,7 @@ export class NebProxy {
for (const feedUrl of allUrls) {
let feed = currentConfig.feeds[feedUrl];
if (!feed) feed = {poll_interval_mins: 60, rooms: []};
if (!feed.rooms) feed.rooms = [];
const hasRoom = feed.rooms.indexOf(roomId) !== -1;
const isEnabled = feedUrls.indexOf(feedUrl) !== -1;