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
newValue = newValue.replace(regex, (match: string) => match + '\n\n')
if (updateFormValue && newValue) {
if (updateFormValue) {
updateFormValue(newValue)
}
}

View File

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