fix(lib): empty text fields not saving in profile forms (#437)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: antontranelis <31516529+antontranelis@users.noreply.github.com>
Co-authored-by: mahula <lenzmath@posteo.de>
This commit is contained in:
Copilot 2025-11-19 06:51:31 +00:00 committed by GitHub
parent 9a241f4c77
commit 1b22b37b09
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -44,7 +44,7 @@ export function RichTextEditor({
const regex = /!\[.*?\]\(.*?\)/g const regex = /!\[.*?\]\(.*?\)/g
newValue = newValue.replace(regex, (match: string) => match + '\n\n') newValue = newValue.replace(regex, (match: string) => match + '\n\n')
if (updateFormValue && newValue) { if (updateFormValue) {
updateFormValue(newValue) updateFormValue(newValue)
} }
} }

View File

@ -273,7 +273,7 @@ export const onUpdateItem = async (
setLoading(true) setLoading(true)
state.text state.text
.toLocaleLowerCase() ?.toLocaleLowerCase()
.match(hashTagRegex) .match(hashTagRegex)
?.map((tag) => { ?.map((tag) => {
if (!tags.find((t) => t.name.toLocaleLowerCase() === tag.slice(1).toLocaleLowerCase())) { if (!tags.find((t) => t.name.toLocaleLowerCase() === tag.slice(1).toLocaleLowerCase())) {