Commit 48db8c1
authored
fix: correct slugifyTitle hook example in documentation (#16306)
## What?
Fixed incorrect return statement in the `slugifyTitle` field hook
example in the official documentation.
The example was generating a properly formatted slug but then
incorrectly returning the original `value` instead of the slugified
result.
## Why?
This was a bug in the documentation that could mislead developers
implementing automatic slug generation. The hook appeared to work, but
in reality did nothing useful.
## How?
- Changed `return value` to `return slug` in the example
## Before/After
**Before:**
```ts
const slug = value.toLowerCase()...
return value // ← bug
**Aftere:**
```ts
const slug = value.toLowerCase()...
return slug1 parent 8fe5f04 commit 48db8c1
1 file changed
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
295 | | - | |
| 295 | + | |
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
| |||
0 commit comments