Skip to content

Commit

Permalink
Preserve user-defined order of ImmutableList (#1640)
Browse files Browse the repository at this point in the history
  • Loading branch information
MrBurrBurr authored Aug 9, 2023
1 parent 05ff07a commit 0b812a7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/components/Config/Editor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,9 @@
const defaultCheck = this.deleteDefaultValues && fieldSchema && typeof fieldSchema.defaultValue !== 'undefined' && this.isDefault(value, fieldSchema);
if (defaultCheck) {
// eslint-disable-next-line vue/no-mutating-props
delete this.model[field];
} else if (this.model[field] && this.model[field].constructor === Array && fieldSchema.type !== 'dictionary') {
} else if (this.model[field] && this.model[field].constructor === Array && !['dictionary', 'list'].includes(fieldSchema.type)) {
// eslint-disable-next-line vue/no-mutating-props
this.model[field] = value.sort((a, b) => a - b);
} else if (this.model[field] && this.model[field].constructor === Object && fieldSchema.type !== 'dictionary') {
Expand Down

0 comments on commit 0b812a7

Please sign in to comment.