We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 87347b7 + 894c05c commit d9cf6e0Copy full SHA for d9cf6e0
src/pat/close-panel/close-panel.js
@@ -6,11 +6,16 @@ export default Base.extend({
6
trigger: ".close-panel",
7
8
init() {
9
- this.el.addEventListener("click", async (e) => {
+ this.el.addEventListener("click", (e) => {
10
// Find the first element which has a close-panel.
11
// This should the panel-root itself.
12
const panel = this.el.closest(".has-close-panel");
13
14
+ if (!panel) {
15
+ // No ``.has-close-panel``. Exiting.
16
+ return;
17
+ }
18
+
19
// Get the close panel method.
20
const close_method = dom.get_data(panel, "close_panel");
21
0 commit comments