Home

Issue: 774

DOMException error triggered by head script related to vue-meta

[issue link]

In nuxt.config.js I have the following in the head: options:

script: [
    {innerHTML: "(function(h){h.className=h.className.replace(/| js /,' js ')})(document.documentElement)"},
],
__dangerouslyDisableSanitizers: ["script"],

This produces the desired result of making sure the class “js” is on <html> on every page. However, when I navigate to another page I get the following error message:

vue-meta.js:787 Uncaught DOMException: Failed to execute ‘setAttribute’ on ‘Element’: ‘0’ is not a valid attribute name.

This question is available on Nuxt.js community (#c659)