Super Sale Limited Time 50% OFF for All-Access Plans
Save 50% Now

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
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(

Replies (2)


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.



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.


Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(
Text formatting options
Submit
Click any option to insert into your comment. Select text first to wrap it.
  • **text** to make things bold
  • *text* to emphasize
  • ### Heading to make headings
  • [link text](url) for links
  • ![alt text](image-url) to paste in an image
  • - item to make a list
  • 1. item to make an ordered list
  • > quote to quote somebody
  • `code` for single line of code
  • ```js ... ``` for JS code block
  • ```html ... ``` for HTML code block
  • ```scss ... ``` for SCSS code block
  • ```php ... ``` for PHP code block
  • --- for a horizontal rule
  • happy  :)
  • shocked  :|
  • sad  :(