Provide fallback if pinnedConversationIds not already set

This commit is contained in:
Chris Svenningsen 2020-10-07 18:26:09 -07:00 committed by Josh Perez
parent 59a181bd30
commit d7f3b39fec

View file

@ -416,7 +416,7 @@ Whisper.ConversationView = Whisper.View.extend({
setPin(value: boolean) {
if (value) {
if (window.storage.get('pinnedConversationIds').length >= 4) {
if (window.storage.get('pinnedConversationIds', []).length >= 4) {
this.showToast(Whisper.PinnedConversationsFullToast);
return;
}