ui icon indicating copy to clipboard operation
ui copied to clipboard

[Bug] TypeError: Cannot convert object to primitive value

Open mshemuni opened this issue 3 years ago • 0 comments

Version

v2.1.0

Reproduction link

https://github.com/twbs/bootstrap/issues/30553#issuecomment-612617589

Operating System

Ubuntu

Device

PC and Mobile

Browser & Version

All Browsers

Steps to reproduce

  1. Create a site using material design
  2. Try to add JS9: https://js9.si.edu/
  3. add static files. refer to js9support.min.js as example shows.

What is expected?

When navbar-toggler width data-target of #navigation-example is clicked an animation to open a side bar is expected.

What is actually happening?

An error says TypeError: Cannot convert object to primitive value and no side bar is opened


Solution

https://github.com/twbs/bootstrap/issues/30553#issuecomment-612617589

chanhed this line: if (!i && l.toggle && /show|hide/.test(t) && (l.toggle = !1), i || (i = new r(this, l), o.data(n, i)), 'string' == typeof t) {

to this: if (!i && l.toggle && /show|hide/.test(l) && (l.toggle = !1), i || (i = new r(this, l), o.data(n, i)), 'string' == typeof t) {

Additional comments

Unfortunately my code is not in production. So I cannot create a codepen etc...

mshemuni avatar Feb 14 '22 14:02 mshemuni