DiscoTOC - automatic table of contents

Since this update, I’m seeing an error on discourse-docs pages that have a table of contents. For example, on this page on Meta, the ToC isn’t displayed, and I see an error in my browser dev tools:

On my site, I also see a banner at the top of the page saying “Posts may not display correctly because one of the post content decorators on your site raised an error. Check the browser developer tools for more information.”