Skip to content

Commit

Permalink
fix(RN): 兼容 config 未定义的情况
Browse files Browse the repository at this point in the history
  • Loading branch information
Pines-Cheng committed Sep 27, 2018
1 parent c488565 commit 94d0f23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/taro-router-rn/src/utils.js
Expand Up @@ -6,7 +6,7 @@ export const HEADER_CONFIG_MAP = {
navigationStyle: 'navigationStyle' // 导航栏样式,仅支持以下值:default 默认样式 custom 自定义导航栏,只保留右上角胶囊按钮
}

export function getNavigationOptions (config) {
export function getNavigationOptions (config = {}) {
let navigationOptions = {}
Object.keys(config).forEach(function (key) {
if (key in HEADER_CONFIG_MAP) {
Expand Down

0 comments on commit 94d0f23

Please sign in to comment.