Builder: Modal - code simplification

This commit is contained in:
Michael Shanks 2019-11-03 10:24:48 +00:00
parent d5fb7e50c8
commit 01180d7718
1 changed files with 5 additions and 5 deletions

View File

@ -8,12 +8,12 @@ export let id = "";
let ukModal;
let listenerAdded = false;
$: if(ukModal && !listenerAdded) {
listenerAdded = true;
ukModal.addEventListener("hide", onClosed);
}
$: {
if(ukModal && !listenerAdded) {
listenerAdded = true;
ukModal.addEventListener("hide", onClosed);
}
if(ukModal) {
if(isOpen) {
UIkit.modal(ukModal).show();