Scrollspy is not a function after convert 4.6 to 5.0

Good day,
I have problem with creative theme. After convert to BS5 navBar stop change color.

Console:

script.min.js?h=a6a57449ac8cc49887c971c1fd45f9ee:1 Uncaught TypeError: a(…).scrollspy is not a function
at script.min.js?h=a6a57449ac8cc49887c971c1fd45f9ee:1
at script.min.js?h=a6a57449ac8cc49887c971c1fd45f9ee:1
(anonymous) @ script.min.js?h=a6a57449ac8cc49887c971c1fd45f9ee:1
(anonymous) @ script.min.js?h=a6a57449ac8cc49887c971c1fd45f9ee:1

Anybody know how fix this. Thank you.

Scrollspy is a Bootstrap 4 jQuery plugin, which doesn’t exist in Bootstrap 5. You can see how scrollspy is done in Bootstrap 5 here.

In the creative.js
Replace this

$('body').scrollspy({
	target: '#mainNav',
	offset: 57
});

to this

var scrollSpy = new bootstrap.ScrollSpy(document.body, {
	target: '#mainNav',
	offset:57
});