Hey Ben, this has been fixed with https://github.com/discourse/discourse/commit/99d1ded3b3a2767617bbee9824e93eb57f135864. Could you please update your site to latest and try again?
After the update, you may need to edit your custom JavaScript (adding/removing a trailing space will do) to trigger a cache rebuild to see the effects.