1.fix 当imageKnifeOption参数传入为undefined时,由于对undefined数据进行读取属性导致的crash问题
Signed-off-by: zhoulisheng1 <zhoulisheng1@huawei.com>
This commit is contained in:
parent
d77539c555
commit
48b4844ed7
|
@ -251,7 +251,7 @@ export struct ImageKnifeComponent {
|
|||
}
|
||||
// imageknife 第一次启动和数据刷新后重新发送请求
|
||||
imageKnifeExecute() {
|
||||
if (this.imageKnifeOption.loadSrc == null) {
|
||||
if (this.imageKnifeOption == null || this.imageKnifeOption.loadSrc == null) {
|
||||
// 如果数据是null或者undefined,清空图片内容和gif循环,并且不进入图片请求流程
|
||||
this.resetGifData()
|
||||
if (this.canvasHasReady) {
|
||||
|
|
Loading…
Reference in New Issue