Skip to content

Commit 8208d83

Browse files
committed
docs tweaks
1 parent 0b6eeb4 commit 8208d83

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/query/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ $<HTMLInputElement>('input').value = '';
4949

5050
### `$.optional()` selector
5151

52-
`$()` throws when no matching element is found. To avoid this behavior, use `$.optional()`:
52+
`$()` throws when no matching element is found. To handle undefined values, use `$.optional()`:
5353

5454
```astro
5555
---
@@ -87,7 +87,7 @@ ready(() => {
8787
</script>
8888
```
8989

90-
## Global `$.ready()` function
90+
### `$.ready()` function
9191

9292
All `$` queries must be nested in a `$.ready()` block. This opts in to using the global `$` from client scripts. `$.ready()` also ensures your code reruns on every page [when view transitions are enabled.](https://docs.astro.build/en/guides/view-transitions/)
9393

www/src/content/docs/query.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ $<HTMLInputElement>('input').value = '';
5252

5353
### `$.optional()` selector
5454

55-
`$()` throws when no matching element is found. To avoid this behavior, use `$.optional()`:
55+
`$()` throws when no matching element is found. To handle undefined values, use `$.optional()`:
5656

5757
```astro
5858
---
@@ -90,7 +90,7 @@ ready(() => {
9090
</script>
9191
```
9292

93-
## Global `$.ready()` function
93+
## `$.ready()` function
9494

9595
All `$` queries must be nested in a `$.ready()` block. This opts in to using the global `$` from client scripts. `$.ready()` also ensures your code reruns on every page [when view transitions are enabled.](https://docs.astro.build/en/guides/view-transitions/)
9696

0 commit comments

Comments
 (0)