Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[wx] transformer针对&&判断转化错误 #3697

Closed
YuanQuan opened this issue Jul 5, 2019 · 3 comments
Closed

[wx] transformer针对&&判断转化错误 #3697

YuanQuan opened this issue Jul 5, 2019 · 3 comments
Assignees

Comments

@YuanQuan
Copy link
Contributor

YuanQuan commented Jul 5, 2019

问题描述
编译1.3.5版本时报错,1.3.2版本没问题
复现步骤

源代码 
{
allData["brand"] && allData["brand"]["logoImg"] 
&& <XImage  src={allData["brand"]["logoImg"]}
                        mode="aspectFit"
                        onClick={this.closeBuyFloat.bind(this)}
                        className="brand_img"
     />
}

编译后的代码

image




**期望行为**
allData["brand"]  如果不存在,此时会报错

**报错信息**

![image](https://user-images.githubusercontent.com/2345176/60712703-2e053400-9f4a-11e9-92ae-abfd0aff53a2.png)


**系统信息**
> Taro v1.2 及以上版本已添加 `taro info` 命令,方便大家查看系统及依赖信息,运行该命令后将结果贴下面即可。

- 操作系统: [e.g. Windows 10]
- Taro 版本 [1.3.5]
- Node.js 版本 [e.g. v9.0.0]
- 报错平台 [weapp]

@taro-bot
Copy link

taro-bot bot commented Jul 5, 2019

欢迎提交 Issue~

如果你提交的是 bug 报告,请务必遵循 Issue 模板的规范,尽量用简洁的语言描述你的问题,最好能提供一个稳定简单的复现。🙏🙏🙏

如果你的信息提供过于模糊或不足,或者已经其他 issue 已经存在相关内容,你的 issue 有可能会被关闭。

Good luck and happy coding~

@taro-bot
Copy link

taro-bot bot commented Jul 8, 2019

CC @yuche

@taro-bot taro-bot bot assigned yuche Jul 8, 2019
@yuche yuche closed this as completed in 24e717f Jul 8, 2019
@yuche yuche reopened this Jul 22, 2019
@yuche
Copy link
Contributor

yuche commented Jul 22, 2019

close via 98c2f86

@yuche yuche closed this as completed Jul 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants