Skip to content

Commit

Permalink
fix: Solve the problem that the document editor will report an error …
Browse files Browse the repository at this point in the history
…when the type name includes multiple spaces (#23940)
  • Loading branch information
fierflame committed Dec 26, 2023
1 parent 4b5658a commit 854cebd
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frappe/public/js/form_builder/components/Field.vue
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const label_input = ref(null);
const hovered = ref(false);
const selected = computed(() => store.selected(props.field.df.name));
const component = computed(() => {
return props.field.df.fieldtype.replace(" ", "") + "Control";
return props.field.df.fieldtype.replaceAll(" ", "") + "Control";
});
function remove_field() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ let docfield_df = computed(() => {
<div v-if="store.form.selected_field">
<div class="field" v-for="(df, i) in docfield_df" :key="i">
<component
:is="df.fieldtype.replace(' ', '') + 'Control'"
:is="df.fieldtype.replaceAll(' ', '') + 'Control'"
:args="args"
:df="df"
:read_only="store.read_only"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ let properties = computed(() => {
<div v-if="doc">
<div class="field" v-for="df in properties" :key="df.name">
<component
:is="df.fieldtype.replace(' ', '') + 'Control'"
:is="df.fieldtype.replaceAll(' ', '') + 'Control'"
:df="df"
:value="doc[df.fieldname]"
v-model="doc[df.fieldname]"
Expand Down

0 comments on commit 854cebd

Please sign in to comment.