| Viewed 2105 times

Uncaught TypeError: Cannot convert object to primitive value


I have got an error message when I clicked on the bootstrap button dropdown menu

2 Answer
Mohammad Qandeel
Answered
11

Uncaught TypeError: Cannot convert object to primitive value

Can't convert object to primitive value(zone-evergreen:171).


Uncaught Type Error: Cannot convert object to primitive value(zone-evergreen.js:171 )
    at RegExp.test (<anonymous>)
    at HTMLDivElement.<anonymous> (bootstrap.bundle.min.js:6)
    at Function.each (jquery.min.js:2)
    at S.fn.init.each (jquery.min.js:2)
    at S.fn.init.a._jQueryInterface [as collapse] (bootstrap.bundle.min.js:6)
    at HTMLDivElement.<anonymous> (bootstrap.bundle.min.js:6)
    at Function.each (jquery.min.js:2)
    at S.fn.init.each (jquery.min.js:2)
    at HTMLButtonElement.<anonymous> (bootstrap.bundle.min.js:6)
    at HTMLDocument.dispatch (jquery.min.js:2)

 

This error happens on jquery Version 3.5.0 

Many projects that depend on hasOwnProperty() function availability can be affected as well. so you can use another version of jquery like 3.4.1 instead of 3.5.0

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>

salameh
Answered
12

that happens on jQuery version 3.5.0 

recently get this error msg cannot convert object to primitive value on bootstrap 

I was solved this problem by using the jquery version 3.5.1 Released

You can get the files from the jQuery CDN, or link to them directly:

https://code.jquery.com/jquery-3.5.1.js

https://code.jquery.com/jquery-3.5.1.min.js

You can also get this release from npm:

npm install jquery@3.5.1



Related Questions