File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
packages/@vuepress/core/lib/client/root-mixins Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -37,8 +37,14 @@ export default {
37
37
const pageMeta = this . $page . frontmatter . meta || [ ]
38
38
// pageMetaTags have higher priority than siteMetaTags
39
39
// description needs special attention as it has too many entries
40
- return unionBy ( [ { name : 'description' , content : this . $description } ] ,
41
- pageMeta , this . siteMeta , metaIdentifier )
40
+ const ary = [ { name : 'description' , content : this . $description } ]
41
+ if ( document ) {
42
+ ary . push (
43
+ { charset : document . querySelector ( 'meta[charset]' ) . getAttribute ( 'charset' ) } ,
44
+ { name : 'viewport' , content : document . querySelector ( 'meta[name=viewport]' ) . content }
45
+ )
46
+ }
47
+ return unionBy ( ary , pageMeta , this . siteMeta , metaIdentifier )
42
48
}
43
49
} ,
44
50
You can’t perform that action at this time.
0 commit comments