mirror of
https://github.com/turt2live/matrix-dimension.git
synced 2024-10-01 01:05:53 -04:00
Validate that we have a rooms array when modifying feeds
This commit is contained in:
parent
b47693561f
commit
43460eef7f
@ -200,6 +200,7 @@ export class NebProxy {
|
|||||||
for (const feedUrl of allUrls) {
|
for (const feedUrl of allUrls) {
|
||||||
let feed = currentConfig.feeds[feedUrl];
|
let feed = currentConfig.feeds[feedUrl];
|
||||||
if (!feed) feed = {poll_interval_mins: 60, rooms: []};
|
if (!feed) feed = {poll_interval_mins: 60, rooms: []};
|
||||||
|
if (!feed.rooms) feed.rooms = [];
|
||||||
|
|
||||||
const hasRoom = feed.rooms.indexOf(roomId) !== -1;
|
const hasRoom = feed.rooms.indexOf(roomId) !== -1;
|
||||||
const isEnabled = feedUrls.indexOf(feedUrl) !== -1;
|
const isEnabled = feedUrls.indexOf(feedUrl) !== -1;
|
||||||
|
Loading…
Reference in New Issue
Block a user