FIX: ui.flyout .close undefined

This commit is contained in:
Tony Air 2019-12-04 18:19:04 +07:00
parent 26a28191aa
commit 1528e1044e
3 changed files with 22 additions and 19 deletions

2
dist/js/app.js vendored

File diff suppressed because one or more lines are too long

2
dist/js/app.js.map vendored

File diff suppressed because one or more lines are too long

View File

@ -17,11 +17,14 @@ const FlyoutUI = (($) => {
class FlyoutUI {
static init() {
const ui = this;
const $close = ui.$modal.find(`.flyout-${NAME}__close`);
ui.$modal = $(`.flyout-${NAME}`);
if (ui.$modal.length) {
if (!ui.$modal.length) {
return false;
}
const $close = ui.$modal.find(`.flyout-${NAME}__close`);
ui.$modal.data(NAME, ui);
if ($close.length) {
@ -37,7 +40,7 @@ const FlyoutUI = (($) => {
ui.show();
}, TIMEOUT);
}
}
}
static show(callback) {