bootstrap: Bootstrap v4.4.1 collapse doesn't work with jQuery v3.5.0

Hello together,

after upgrade to jQuery 3.5.0 I’m getting an exception TypeError: Cannot convert object to primitive value while clicking to navbar-toggler button

It leads to the line https://github.com/twbs/bootstrap/blob/dca1ab7d877bc4b664b43604657a2b5fbe2b4ecb/js/src/collapse.js#L346

Works fine with jQuery 3.4.1.

Any system and browser.

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Reactions: 25
  • Comments: 29 (12 by maintainers)

Commits related to this issue

Most upvoted comments

True I had trouble when I tried that but tests were broken due to other jQuery changes.

I’ll try again later in my branch.

On Sun, Apr 12, 2020, 16:50 Alazar Kassahun notifications@github.com wrote:

if (!data && _config.toggle && /show|hide/.test(config))

should be

if (!data && _config.toggle && /show|hide/.test(_config))

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/twbs/bootstrap/issues/30553#issuecomment-612617589, or unsubscribe https://github.com/notifications/unsubscribe-auth/AACVLNM64H276MOT7E33PCLRMHBJVANCNFSM4MF4XAFA .

@alazark94 thanks bruh!, work as fine

Change it to “jquery”: “3.4.1”

Just remove the ‘^’ character

in node_modules/bootsrap/dist/js/bootstrap.js line 1509 change

if (!data && _config.toggle && /show|hide/.test(config))

to

if (!data && _config.toggle && /show|hide/.test(_config))

or use jquery 3.4.1 until twbs/bootstrap#30553 is fixed