Skip to content

Commit

Permalink
Fix access to _vtbot_debug in production
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored and martrapp committed Apr 6, 2024
1 parent 7ceb357 commit 6bbd038
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 28 deletions.
5 changes: 5 additions & 0 deletions .changeset/empty-meals-collect.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"astro-vtbot": patch
---

Fixes a bug with VtBotDebug when included in production build.
2 changes: 1 addition & 1 deletion components/VtBotDebug.astro
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const active = import.meta.env.DEV || production;
prefix.init('[vtbot-debug]', COLORED);
const enabled_out = () => !!document.querySelector('meta[name="vtbot-debug"]');

const enabled_in = () => window._vtbot_debug.closing > 0;
const enabled_in = () => window._vtbot_debug?.closing ?? 0 > 0;

let beginning = 0;

Expand Down
38 changes: 11 additions & 27 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 6bbd038

Please sign in to comment.