From 007d17fee072955d4acb846a06d9eb666e908ef6 Mon Sep 17 00:00:00 2001 From: Erika <3019731+Princesseuh@users.noreply.github.com> Date: Thu, 2 May 2024 10:31:19 +0200 Subject: [PATCH] Fixes toggleState (#10933) --- .changeset/lovely-feet-greet.md | 5 +++++ packages/astro/src/runtime/client/dev-toolbar/helpers.ts | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) create mode 100644 .changeset/lovely-feet-greet.md diff --git a/.changeset/lovely-feet-greet.md b/.changeset/lovely-feet-greet.md new file mode 100644 index 0000000000..9ba35a1552 --- /dev/null +++ b/.changeset/lovely-feet-greet.md @@ -0,0 +1,5 @@ +--- +"astro": patch +--- + +Fixes `app.toggleState` not working correctly diff --git a/packages/astro/src/runtime/client/dev-toolbar/helpers.ts b/packages/astro/src/runtime/client/dev-toolbar/helpers.ts index 849c8cb101..c205d0003d 100644 --- a/packages/astro/src/runtime/client/dev-toolbar/helpers.ts +++ b/packages/astro/src/runtime/client/dev-toolbar/helpers.ts @@ -46,7 +46,7 @@ export class ToolbarAppEventTarget extends EventTarget { */ toggleState(options: AppStatePayload) { this.dispatchEvent( - new CustomEvent('app-toggled', { + new CustomEvent('toggle-app', { detail: { state: options.state, } satisfies AppStatePayload,