FIX: prevents crash if composer trasnlation is not defined (#5)

This commit is contained in:
Joffrey JAFFEUX 2019-05-20 17:06:22 +02:00 committed by GitHub
parent 3ce319c4a1
commit e22540ad73
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -364,7 +364,11 @@
});
if (currUserTrustLevel >= minimumTrustLevel) {
I18n.translations[I18n.currentLocale()].js.composer.contains_dtoc = "";
if (!I18n.translations[I18n.currentLocale()].js.composer) {
I18n.translations[I18n.currentLocale()].js.composer = {};
}
I18n.translations[I18n.currentLocale()].js.composer.contains_dtoc = " ";
api.addToolbarPopupMenuOptionsCallback(() => {
const composerController = api.container.lookup("controller:composer");