Skip to content

Commit

Permalink
fix(popover): 'destroyOutsideClickHandler is not a function'
Browse files Browse the repository at this point in the history
  • Loading branch information
desmondinho committed Nov 1, 2024
1 parent fa2c0b6 commit b1c2df6
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/LumexUI/wwwroot/js/components/popover.bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -1475,7 +1475,10 @@ async function initialize(id, options) {
}

function destroy() {
destroyOutsideClickHandler();
if (destroyOutsideClickHandler) {
destroyOutsideClickHandler();
destroyOutsideClickHandler = null;
}
}

const popover = {
Expand Down
5 changes: 4 additions & 1 deletion src/LumexUI/wwwroot/js/components/popover.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,10 @@ async function initialize(id, options) {
}

function destroy() {
destroyOutsideClickHandler();
if (destroyOutsideClickHandler) {
destroyOutsideClickHandler();
destroyOutsideClickHandler = null;
}
}

export const popover = {
Expand Down

0 comments on commit b1c2df6

Please sign in to comment.