Skip to content

Commit

Permalink
fix: api.userConfig.analytics is options
Browse files Browse the repository at this point in the history
Cannot read property 'baidu' of undefined
TypeError: Cannot read property 'baidu' of undefined
  • Loading branch information
xiaohuoni authored Apr 10, 2020
1 parent a3f89a4 commit 4f0b4b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/plugin-analytics/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export default (api: IApi) => {
},
},
});
const { analytics } = api.userConfig;
const { analytics = {} } = api.userConfig;
const { baidu, ga = GA_KEY } = analytics;
api.logger.log('insert analytics');

Expand Down

0 comments on commit 4f0b4b6

Please sign in to comment.