Skip to content

Commit

Permalink
fix: remove oneOf conditions
Browse files Browse the repository at this point in the history
  • Loading branch information
leonied7 committed Feb 15, 2022
1 parent 53ba0d1 commit e044182
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
9 changes: 0 additions & 9 deletions src/components/fields/BooleanField.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,6 @@ export default {
props: PROPS,
computed: {
enumOptions() {
if (Array.isArray(this.schema.oneOf)) {
return optionsList({
oneOf: this.schema.oneOf.map((option) => ({
...option,
title: option.title || (option.const === true ? 'yes' : 'no')
}))
});
}
return optionsList({
enum: this.schema.enum || [true, false],
enumNames:
Expand Down
5 changes: 0 additions & 5 deletions src/components/widgets/CheckboxWidget.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,6 @@ function schemaRequiresTrueValue(schema) {
return true;
}
// If oneOf has a single value, evaluate the subschema
if (schema.oneOf && schema.oneOf.length === 1) {
return schemaRequiresTrueValue(schema.oneOf[0]);
}
// Evaluate each subschema in allOf, to see if one of them requires a true
// value
if (schema.allOf) {
Expand Down

0 comments on commit e044182

Please sign in to comment.