Browse Source

fix: error when open log data

Ahmad Kholid 2 years ago
parent
commit
177a745b86
1 changed files with 2 additions and 3 deletions
  1. 2 3
      src/components/newtab/logs/LogsHistory.vue

+ 2 - 3
src/components/newtab/logs/LogsHistory.vue

@@ -429,12 +429,11 @@ const logCtxData = computed(() => {
   if (!state.itemId || !logData[state.itemId]) return '';
 
   const data = logData[state.itemId];
+  /* eslint-disable-next-line */
+  if (data?.referenceData) getDataSnapshot(data.referenceData);
   const itemLogData =
     state.activeTab === 'all' ? data : objectPath.get(data, state.activeTab);
 
-  /* eslint-disable-next-line */
-  getDataSnapshot(itemLogData.referenceData);
-
   return JSON.stringify(itemLogData, null, 2);
 });