Get 2024 Templates Mega Bundle!14 Bootstrap, Vue & React Templates + 3 Vector Sets
Get for 99$

Toolbars - Extended


Hello,

When accessing the page <a>https://preview.keenthemes.com/metronic8/demo1/toolbars/extended.html</a> an error is thrown in the console:


Uncaught TypeError: Cannot read properties of null (reading "closest")
at KTMenu.getInstance (scripts.bundle.js:2425:25)
at handleToggle (scripts.bundle.js:7710:33)
at Object.init (scripts.bundle.js:7791:5)
at HTMLDocument.<anonymous> (scripts.bundle.js:7807:15)


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (2)


Hi,

Thank you for your feedback on this. We will fix the error in the next update.

Once the fix is released you can get it by just replacing the src folder in your project.

Regards.



Hello @ fnaf 2
The error message you encountered suggests that there is a null value being used with the "closest" method in the KTMenu.getInstance function. This error typically occurs when the element on which the "closest" method is called does not exist or cannot be found. I think you should check the HTML structure of the page, especially the elements involved in the KTMenu.getInstance function. Ensure that the elements exist and are correctly positioned in the DOM. The "closest" method searches for the closest ancestor that matches a specific selector, so make sure the element hierarchy is correct.


Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Here's a how to add some HTML formatting to your comment:
  • <pre></pre> for JS codes block
  • <pre lang="html"></pre> for HTML code block
  • <pre lang="scss"></pre> for SCSS code block
  • <pre lang="php"></pre> for PHP code block
  • <code></code> for single line of code
  • <strong></strong> to make things bold
  • <em></em> to emphasize
  • <ul><li></li></ul>  to make list
  • <ol><li></li></ol>  to make ordered list
  • <h3></h3> to make headings
  • <a></a> for links
  • <img> to paste in an image
  • <blockquote></blockquote> to quote somebody
  • happy  :)
  • shocked  :|
  • sad  :(