Skip to content

Commit

Permalink
fix($social-share): 兼容 platform 设置为 '' 的场景
Browse files Browse the repository at this point in the history
  • Loading branch information
EliazTray committed Mar 15, 2021
1 parent 9f136cd commit c01a650
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/social-share/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ class SocialShare {
private messager?: EventEmitter

constructor(config: SocialShareConfig) {
this.platform = config.platform ?? (isNative() ? 'native' : 'web')
this.platform = config.platform || (isNative() ? 'native' : 'web')
if (config.wxConfig) {
// 配置 wechat
this.messager = new EventEmitter()
Expand Down

0 comments on commit c01a650

Please sign in to comment.