Skip to content

Commit

Permalink
clone menu fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Fred Heusschen committed Dec 23, 2022
1 parent 3b010c2 commit ae54b32
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
3 changes: 2 additions & 1 deletion dist/mburger/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,8 @@ export default class extends HTMLElement {
__classPrivateFieldGet(this, _instances, "m", _disconnectMenu).call(this);
}
/** Node for the new menu. */
const menuNode = document.querySelector(`#mm-${newValue}`) ||
const menuNode = document.querySelector(`#mm-clone-${newValue}`) ||
document.querySelector(`#mm-${newValue}`) ||
document.querySelector(`#${newValue}`);
if (!menuNode) {
return;
Expand Down
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "mburger-webcomponent",
"version": "3.1.3",
"version": "3.1.4",
"main": "dist/mburger/index.js",
"module": "dist/mburger/index.js",
"author": "Fred Heusschen <[email protected]>",
Expand Down
1 change: 1 addition & 0 deletions src/mburger/js/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ export default class extends HTMLElement {

/** Node for the new menu. */
const menuNode: HTMLElement =
document.querySelector(`#mm-clone-${newValue}`) ||
document.querySelector(`#mm-${newValue}`) ||
document.querySelector(`#${newValue}`);

Expand Down

0 comments on commit ae54b32

Please sign in to comment.