FIX: Error when filtering site settings

Happened only when none of the logo settings had an image assigned.
This commit is contained in:
Gerhard Schlager 2019-03-03 20:31:31 +01:00
parent aaf106fc2d
commit 14f9e55977
1 changed files with 4 additions and 1 deletions

View File

@ -15,7 +15,10 @@ export default Ember.Component.extend(UploadMixin, {
willDestroyElement() {
this._super(...arguments);
$("a.lightbox").magnificPopup("close");
const elem = $("a.lightbox");
if (elem && typeof elem.magnificPopup === "function") {
$("a.lightbox").magnificPopup("close");
}
},
@computed("imageUrl")