Skip to content

Commit

Permalink
fix(meta): allow setting appleStatusBarStyle without mobileAppIOS
Browse files Browse the repository at this point in the history
fixes #338
  • Loading branch information
pi0 committed Oct 6, 2020
1 parent c0d86ea commit b0f226a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion docs/content/en/meta.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ Please read this resources before you enable `mobileAppIOS` option:
### `appleStatusBarStyle`
- Default: `default`
- Meta: `apple-mobile-web-app-status-bar-style`
- Requires `mobileAppIOS` to be `true`

There are three options for the status bar style:
1. `default`: The default status bar style for Safari PWAs; white background with black text and icons.
Expand Down
6 changes: 3 additions & 3 deletions lib/meta/module.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ function generateMeta (pwa) {
nativeUI: false,
favicon: true,
mobileAppIOS: undefined,
appleStatusBarStyle: 'default',
appleStatusBarStyle: undefined,
theme_color: undefined,
lang: 'en',
ogType: 'website',
Expand Down Expand Up @@ -88,11 +88,11 @@ function generateMeta (pwa) {
}

// statusBarStyle (IOS)
if (options.mobileAppIOS && options.appleStatusBarStyle) {
if (options.mobileAppIOS || options.appleStatusBarStyle) {
head.meta.push({
hid: 'apple-mobile-web-app-status-bar-style',
name: 'apple-mobile-web-app-status-bar-style',
content: options.appleStatusBarStyle
content: options.appleStatusBarStyle || 'default'
})
}

Expand Down

0 comments on commit b0f226a

Please sign in to comment.