Skip to content

Commit

Permalink
add conditional to check for logs.value before pushing item (#3734)
Browse files Browse the repository at this point in the history
  • Loading branch information
amiraabouhadid authored Dec 15, 2024
1 parent 12f39f4 commit 0fb7121
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/playground/src/components/logger.vue
Original file line number Diff line number Diff line change
Expand Up @@ -235,9 +235,10 @@ export default {
timestamp: log.timestamp,
message: log.messages.map(IndexedDBClient.serializer.serialize).join(" ").replace(/\n\s/g, "\n"),
});
logs.value.push(item);
scrollToBottom();
if (logs.value) {
logs.value.push(item);
scrollToBottom();
}
}
}
Expand Down

0 comments on commit 0fb7121

Please sign in to comment.