fix: allow turning off theme color tags (#5820)

Co-authored-by: Haoqun Jiang <haoqunjiang@gmail.com>
This commit is contained in:
GabrielGMartinsBr
2020-08-30 22:52:39 -03:00
committed by GitHub
parent d88d927000
commit 34b58c0f62
@@ -111,13 +111,18 @@ module.exports = class HtmlPwaPlugin {
rel: 'manifest',
href: getTagHref(publicPath, manifestPath, assetsVersionStr)
}
),
makeTag('meta', {
name: 'theme-color',
content: themeColor
})
)
)
if (themeColor != null) {
data.head.push(
makeTag('meta', {
name: 'theme-color',
content: themeColor
})
)
}
// Add to home screen for Safari on iOS
data.head.push(
makeTag('meta', {
@@ -154,12 +159,14 @@ module.exports = class HtmlPwaPlugin {
content: getTagHref(publicPath, iconPaths.msTileImage, assetsVersionStr)
}))
}
data.head.push(
makeTag('meta', {
name: 'msapplication-TileColor',
content: msTileColor
})
)
if (msTileColor != null) {
data.head.push(
makeTag('meta', {
name: 'msapplication-TileColor',
content: msTileColor
})
)
}
cb(null, data)
})