mirror of
https://github.com/utopia-os/utopia-ui.git
synced 2025-12-13 07:46:10 +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
|
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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -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())) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user