Fix an error on import page when subscriptions are null.

This commit is contained in:
Kavin 2022-08-05 22:25:51 +05:30
parent 4bacca566e
commit 8e458f4a0e
No known key found for this signature in database
GPG Key ID: 49451E4482CC5BCD

View File

@ -155,7 +155,7 @@ export default {
importSubscriptionsLocally(newChannels) {
const subscriptions = this.override
? [...new Set(newChannels)]
: [...new Set(this.getLocalSubscriptions().concat(newChannels))];
: [...new Set((this.getLocalSubscriptions() ?? []).concat(newChannels))];
// Sort for better cache hits
subscriptions.sort();
localStorage.setItem("localSubscriptions", JSON.stringify(subscriptions));