Budi 7481 initial form step binding drawer can crash (#11751)
* Type safety * Clear localFiles is fieldState is cleared
This commit is contained in:
parent
fb30be6ce4
commit
7f43db09a6
|
@ -235,7 +235,7 @@
|
|||
const baseExtensions = buildBaseExtensions()
|
||||
|
||||
editor = new EditorView({
|
||||
doc: value,
|
||||
doc: value?.toString(),
|
||||
extensions: buildExtensions(baseExtensions),
|
||||
parent: textarea,
|
||||
})
|
||||
|
|
|
@ -17,6 +17,13 @@
|
|||
let fieldApi
|
||||
let localFiles = []
|
||||
|
||||
$: {
|
||||
// If the field state is reset, clear the local files
|
||||
if (!fieldState?.value?.length) {
|
||||
localFiles = []
|
||||
}
|
||||
}
|
||||
|
||||
const { API, notificationStore, uploadStore } = getContext("sdk")
|
||||
const component = getContext("component")
|
||||
|
||||
|
|
Loading…
Reference in New Issue