Skip to content

Commit b7460ab

Browse files
committed
fix items.type
1 parent 6ead876 commit b7460ab

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

packages/vue-vuetify/src/complex/MixedRenderer.vue

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ import {
9494
type ControlElement,
9595
type JsonFormsUISchemaRegistryEntry,
9696
type JsonSchema,
97+
type JsonSchema7,
9798
type UISchemaElement,
9899
} from '@jsonforms/core';
99100
import {
@@ -234,8 +235,23 @@ const createMixedRenderInfos = (
234235
: false;
235236
} else if (schema.type === 'array') {
236237
schema.items = schema.items ?? {};
237-
if (!(schema.items as any).type) {
238-
(schema.items as any).type = [
238+
if (schema.items === true) {
239+
schema.items = {
240+
type: [
241+
'array',
242+
'boolean',
243+
'integer',
244+
'null',
245+
'number',
246+
'object',
247+
'string',
248+
],
249+
};
250+
} else if (
251+
typeof (schema.items as JsonSchema7).type !== 'string' &&
252+
!Array.isArray((schema.items as JsonSchema7).type)
253+
) {
254+
(schema.items as JsonSchema7).type = [
239255
'array',
240256
'boolean',
241257
'integer',

0 commit comments

Comments
 (0)