Rack-mini-profiler not working

added mini profiler’s script in head and got a error
how to fix this?

script async type=“text/javascript”
id=“mini-profiler”
src="/mini-profiler-resources/includes.js">

includes.js:1034 Uncaught TypeError: Cannot read property ‘toLowerCase’ of null
at includes.js:1034
at Object.init (includes.js:1056)
at includes.js:1491

the codes in includes.js like this:

   var hiddenCustomFields = script
      .getAttribute("data-hidden-custom-fields")
      .toLowerCase()
      .split(",");