Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No effect after setting metaInfo #596

Open
geekplux opened this issue Mar 24, 2020 · 1 comment
Open

No effect after setting metaInfo #596

geekplux opened this issue Mar 24, 2020 · 1 comment

Comments

@geekplux
Copy link

geekplux commented Mar 24, 2020

Bug report

Steps to reproduce

setting metaInfo in head or setHead():

  setHead(function() {
    return {
      metaInfo: {
        script: [
          {
            innerHTML: 'console.log("I am in body");',
            type: 'text/javascript',
            body: true
          }
        ]
      }
    }
  })

What is expected?

a <script> tag would be inserted before </body>

What is actually happening?

Other relevant information

  • Result of running saber -v: 0.11.5
  • Browser version (optional):
  • Is Saber a global or local install? local
  • Which package manager did you use for the install? yarn
  • Does this issue occur when all plugins are disabled? no

may just solve it by upgrading vue-meta to v2.1+ (now 2.0.4 https://github.com/saberland/saber/blob/master/packages/saber/package.json#L66)?

https://vue-meta.nuxtjs.org/api/#pbody

@egoist
Copy link
Collaborator

egoist commented Mar 25, 2020

Return the metaInfo properties directly in setHead or head option in your component.

setHead(function() {
    return {
        script[
          {
            innerHTML'console.log("I am in body");',
            type'text/javascript',
            bodytrue
          }
        ]
    }
  })

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants