Skip to content

Commit

Permalink
Always render AutoNameSelected
Browse files Browse the repository at this point in the history
  • Loading branch information
martrapp committed Sep 13, 2024
1 parent 635a6b2 commit 8404b0f
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
5 changes: 5 additions & 0 deletions .changeset/eleven-ties-crash.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'astro-vtbot': patch
---

Fixes an issue where `<AutoNameSelected />` got ignored when no properties were set.
26 changes: 10 additions & 16 deletions components/AutoNameSelected.astro
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,16 @@ if (prefix && prefix.includes(' '))
if (selector === '') throw Error(`${error} selector must not be the empty string`);
---

{
(selector || prefix || force !== undefined || shuffle !== undefined) && (
<meta
name="vtbot-auto-name-selected"
content={
(prefix ?? 'vtbot-hx') +
' ' +
(force ?? '') +
' ' +
(shuffle ?? '') +
' ' +
(selector ?? '')
}
/>
)
}
<meta
name="vtbot-auto-name-selected"
content={(prefix ?? 'vtbot-hx') +
' ' +
(force ?? '') +
' ' +
(shuffle ?? '') +
' ' +
(selector ?? '')}
/>

<script>
import { TRANSITION_BEFORE_PREPARATION } from 'astro:transitions/client';
Expand Down

0 comments on commit 8404b0f

Please sign in to comment.