From 362f5de75ef59e9727eead9b5ec182d2ec06c4f1 Mon Sep 17 00:00:00 2001 From: Azri Kahar <42867097+azrikahar@users.noreply.github.com> Date: Fri, 3 Sep 2021 10:17:31 +0800 Subject: [PATCH] Fix WYSIWYG field not being cleared after "Save and Create New" (#7754) * fix WYSIWYG field not being cleared * return empty string when null for tinymce * Update app/src/components/v-form/form-field.vue Co-authored-by: Rijk van Zanten --- .../input-rich-text-html/input-rich-text-html.vue | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/app/src/interfaces/input-rich-text-html/input-rich-text-html.vue b/app/src/interfaces/input-rich-text-html/input-rich-text-html.vue index dda5701375..575b587bb1 100644 --- a/app/src/interfaces/input-rich-text-html/input-rich-text-html.vue +++ b/app/src/interfaces/input-rich-text-html/input-rich-text-html.vue @@ -289,11 +289,8 @@ export default defineComponent({ const internalValue = computed({ get() { - if (props.value) { - return replaceTokens(props.value, getToken()); - } - - return props.value; + if (!props.value) return ''; + return replaceTokens(props.value, getToken()); }, set(newValue: string) { if (newValue !== props.value && (props.value === null && newValue === '') === false) {