chore: improve filter (#8262)

This commit is contained in:
neverland
2021-03-04 11:27:39 +08:00
committed by GitHub
parent 9fd71923f9
commit 12be46fad8
10 changed files with 31 additions and 37 deletions
+1 -1
View File
@@ -240,7 +240,7 @@ export default createComponent({
const imageFiles = props.modelValue.filter(isImageFile);
const images = imageFiles
.map((item) => item.content || item.url)
.filter((item) => !!item) as string[];
.filter(Boolean) as string[];
imagePreview = ImagePreview({
images,