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 +