【发布时间】:2019-12-03 06:35:25
【问题描述】:
我正在尝试连接单词,同时删除、null 和 undefined。 目前仍然在下图中出现错误。有人会如何解决这个问题?
javascript-string-concatenation-behavior-with-null-or-undefined-values
在图片中,其中一个属性在说
TypeError: 无法读取未定义的属性
它甚至无法首先读取参数,应用未定义的过滤器等。
get copyFromDescription() {
if (this.addressId == 0) {
return 'Select';
} else { return [this.apn, this.combinedAddress,this.addressType.addressTypeDescription].filter(Boolean).join('') }
}
数据值图
【问题讨论】:
标签: angular typescript angular7