mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-12 23:36:00 +00:00
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:
parent
9a241f4c77
commit
1b22b37b09
@ -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)
|
||||
}
|
||||
}
|
||||
|
||||
@ -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())) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user