File tree Expand file tree Collapse file tree 1 file changed +18
-11
lines changed
packages/@vue/cli-plugin-pwa/lib Expand file tree Collapse file tree 1 file changed +18
-11
lines changed Original file line number Diff line number Diff line change @@ -111,13 +111,18 @@ module.exports = class HtmlPwaPlugin {
111111 rel : 'manifest' ,
112112 href : getTagHref ( publicPath , manifestPath , assetsVersionStr )
113113 }
114- ) ,
115- makeTag ( 'meta' , {
116- name : 'theme-color' ,
117- content : themeColor
118- } )
114+ )
119115 )
120116
117+ if ( themeColor != null ) {
118+ data . head . push (
119+ makeTag ( 'meta' , {
120+ name : 'theme-color' ,
121+ content : themeColor
122+ } )
123+ )
124+ }
125+
121126 // Add to home screen for Safari on iOS
122127 data . head . push (
123128 makeTag ( 'meta' , {
@@ -154,12 +159,14 @@ module.exports = class HtmlPwaPlugin {
154159 content : getTagHref ( publicPath , iconPaths . msTileImage , assetsVersionStr )
155160 } ) )
156161 }
157- data . head . push (
158- makeTag ( 'meta' , {
159- name : 'msapplication-TileColor' ,
160- content : msTileColor
161- } )
162- )
162+ if ( msTileColor != null ) {
163+ data . head . push (
164+ makeTag ( 'meta' , {
165+ name : 'msapplication-TileColor' ,
166+ content : msTileColor
167+ } )
168+ )
169+ }
163170
164171 cb ( null , data )
165172 } )
You can’t perform that action at this time.
0 commit comments