I'm not really sure what was causing the script error other than something in the source bootstrap JS file. When the main browser window is resized to a small enough width, the navbar-toggler button appears. But, when this button is pressed, a script error is raised and the collapse toggling doesn't actually work. I downloaded and updated bootstrap.min.js file (v4.5.3) from Bootstrap's v4.5 download page and replaced it with the file that comes in this repo's master branch – the script error is no longer occurring and the toggling works correctly!