|
|
@@ -1,4 +1,5 @@
|
|
|
export function formatPicture(picture) {
|
|
|
- if (!picture) return [];
|
|
|
- return picture.split(',').filter(Boolean).map(url => /https?/.test(url) ? url : `${process.env.VUE_APP_UPLOAD}file/${url}`);
|
|
|
+ if (typeof picture === 'string') picture = picture.split(',');
|
|
|
+ if (!picture || !Array.isArray(picture)) return [];
|
|
|
+ return picture.filter(Boolean).map(url => /https?/.test(url) ? url : `${process.env.VUE_APP_UPLOAD}file/${url}`);
|
|
|
}
|