[Bug] TypeError: Cannot convert object to primitive value
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
- Create a site using material design
- Try to add JS9: https://js9.si.edu/
- add static files. refer to
js9support.min.jsas 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...