yusheng 1 年之前
父節點
當前提交
3882d31cdc
共有 1 個文件被更改,包括 3 次插入0 次删除
  1. 3 0
      src/utils/file.js

+ 3 - 0
src/utils/file.js

@@ -3,6 +3,9 @@ import { TOKEN_HEADER_NAME } from '@/config/setting';
 
 // 获取图片反显url
 export function getImageUrl(path) {
+  if (!path) {
+    return;
+  }
   let fileNames = path.split('/');
   let url =
     window.location.origin +