mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-27 13:40:47 +00:00
Show an error if a conversation window fails to init
I saw this happen once. Seems to be a race condition.
This commit is contained in:
@@ -22,9 +22,13 @@
|
||||
extension.windows.getCurrent(function (windowInfo) {
|
||||
var bg = extension.windows.getBackground();
|
||||
var conversation = bg.getConversationForWindow(windowInfo.id);
|
||||
window.document.title = conversation.getTitle();
|
||||
new Whisper.ConversationView({
|
||||
model: conversation
|
||||
}).$el.prependTo($('body'));
|
||||
if (conversation) {
|
||||
window.document.title = conversation.getTitle();
|
||||
new Whisper.ConversationView({
|
||||
model: conversation
|
||||
}).$el.prependTo($('body'));
|
||||
} else {
|
||||
$('<div>').text('Error').prependTo($('body'));
|
||||
}
|
||||
});
|
||||
}());
|
||||
|
||||
Reference in New Issue
Block a user