Browse Source

修复没有历史记录时,提示不正确的问题

mxd 3 years ago
parent
commit
c0040a098b
1 changed files with 6 additions and 4 deletions
  1. 6 4
      src/components/panel/footer/magic-backup-file.vue

+ 6 - 4
src/components/panel/footer/magic-backup-file.vue

@@ -58,10 +58,12 @@ const loadDifference = () => {
 const load = () => {
     loading.value = true
     request.sendGet('/backup/' + props.id).success(res => {
-        backupData.push(...res)
-        current.value = backupData[0] || {}
-        if(current.value){
-            loadDifference()
+        if(res && res.length > 0){
+            backupData.push(...res)
+            current.value = backupData[0] || {}
+            if(current.value){
+                loadDifference()
+            }
         }
         loading.value = false
     })