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

fix($core): check if meta is from head before removing it #2403

Merged
merged 2 commits into from
Jun 14, 2020

Conversation

Kocal
Copy link
Contributor

@Kocal Kocal commented May 23, 2020

Summary

@chriscdn opened this vuepress/vuepress-theme-blog#78, he is having an issue with <meta> trying to be removed from document.head whereas they where not document.head's children.

This can happens when you use <meta> in <body> for microdatas. This is automatically done by the blog plugin since vuepress/vuepress-theme-blog#64.

Capture d’écran de 2020-05-23 22-03-37

After the fix, global <meta> and <meta> in <body> are still at the good place:
Capture d’écran de 2020-05-23 22-28-10

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • Feature
  • Code style update
  • Refactor
  • Docs
  • Build-related changes
  • Other, please describe:

If changing the UI of default theme, please provide the before/after screenshot:

Does this PR introduce a breaking change? (check one)

  • Yes
  • No

If yes, please describe the impact and migration path for existing applications:

The PR fulfills these requirements:

  • When resolving a specific issue, it's referenced in the PR's title (e.g. fix #xxx[,#xxx], where "xxx" is the issue number)

You have tested in the following browsers: (Providing a detailed version will be better.)

  • Chrome
  • Firefox
  • Safari
  • Edge
  • IE

If adding a new feature, the PR's description includes:

  • A convincing reason for adding this feature
  • Related documents have been updated
  • Related tests have been updated

To avoid wasting your time, it's best to open a feature request issue first and wait for approval before working on it.

Other information:

I would like to add a test to prevent a regression, but it looks like there is not tests for core/lib/client/*.. or maybe I am missing something?
Thanks!

Copy link
Collaborator

@billyyyyy3320 billyyyyy3320 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. LGTM.

@Kocal
Copy link
Contributor Author

Kocal commented Jun 10, 2020

Hey @newsbielt703, do you think you can merge this?

@billyyyyy3320 billyyyyy3320 merged commit 3c94f71 into vuejs:master Jun 14, 2020
larionov pushed a commit to larionov/vuepress that referenced this pull request Aug 19, 2020
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

Successfully merging this pull request may close these issues.

3 participants