Closed deepfriedbrain closed 5 years ago
Not seeing this on the demo site (for example this page doesn't have a TOC and I see no JavaScript errors in the console on resize).
Do you have a reproducible test case repository?
I think you misread my post. It appears on pages that have TOC. I can reproduce it on the demo site.
Refer to this page: https://mmistakes.github.io/minimal-mistakes/layout-table-of-contents-post/
OK. I'm able to reproduce. When I rolled back jQuery the other day and uglified the scripts there were a few warnings related to the Gumshoe and scroll scripts. Perhaps something is getting mangled there when everything is concatenated.
Will have to play around.
It's Gumshoe related. When I use the unconcatenated versions of the scripts the error has more context.
TypeError: contents is undefined[Learn More] gumshoe.js:111:3
sortContents http://127.0.0.1:4000/test/assets/js/plugins/gumshoe.js:111
timeout http://127.0.0.1:4000/test/assets/js/plugins/gumshoe.js:412
Updating Gumshoe to v5.1.1 seems to have fixed it.
Thank you. Was the jquery change from minified version to the full version intentional?
Yes. The uglify script I run minifies all the JavaScript when it concatenates. It does a better job of that if you run it on unminified code first... shaved about 2k off the file size.
Yes, makes sense. I just wanted to confirm. The error has been resolved. Thanks!
BTW, I did notice that the jquery.min.js has been left in eventhough it's not used.
Environment
Expected behavior
If any page that contains a TOC is resized, the following Javascript error is thrown in the console:
I'm using the default version of the theme (no fork), and have not modified main.min.js. I'm using Chrome 74.x (latest version).