Skip to content

Commit

Permalink
fix: data Object empty
Browse files Browse the repository at this point in the history
  • Loading branch information
hakenprog committed Nov 2, 2023
1 parent 9c65178 commit dba7998
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/runtime/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ const readLocalData = () => {
}
} catch (error) {
console.error("Error parsing local storage data", error);
return;
}
return [];
};

const getSessionID = () => {
Expand Down Expand Up @@ -68,7 +68,7 @@ const generateAdditionalInfo = () => {
};

const isRepeatedEntry = (data: Ref<DataObject[]>, currentSessionID: string) => {
const lastEntry = data.value[0];
const lastEntry = data.value?.[0];
return lastEntry && lastEntry.sessionId === currentSessionID;
};

Expand Down

0 comments on commit dba7998

Please sign in to comment.