Skip to content

Commit

Permalink
Update format.js (#1935)
Browse files Browse the repository at this point in the history
在关闭详情弹窗后 detailFrom为空对象,arr为undefined 使用slice控制台会报错
  • Loading branch information
zayn-code authored Nov 15, 2024
1 parent a9894ac commit f7889b9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion web/src/utils/format.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const ReturnArrImg = (arr) => {
}
} else {
// 如果不是数组类型
if (arr.slice(0, 4) !== 'http') {
if (arr?.slice(0, 4) !== 'http') {
imgArr.push(path + arr)
} else {
imgArr.push(arr)
Expand Down

0 comments on commit f7889b9

Please sign in to comment.