Skip to content

Commit

Permalink
fix: remove trailing commas when sanitizing (#7007)
Browse files Browse the repository at this point in the history
* fix: remove trailing commas when sanitizing

* chore: remove console log
  • Loading branch information
RostiMelk committed Jun 21, 2024
1 parent b29a444 commit 6b9f910
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/@sanity/cli/src/util/journeyConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -251,8 +251,8 @@ export function wrapSchemaTypeInHelpers(schemaType: SchemaObject, root: boolean

const serializedProps = serialize(otherProperties)
const fieldsDef =
fields && `fields: [${fields.map((f) => wrapSchemaTypeInHelpers(f, false)).join('')}],`
const ofDef = of && `of: [${of.map((f) => `defineArrayMember({${serialize(f)}})`).join(',')}],`
fields && `fields: [${fields.map((f) => wrapSchemaTypeInHelpers(f, false)).join('')}]`
const ofDef = of && `of: [${of.map((f) => `defineArrayMember({${serialize(f)}})`).join(',')}]`
const previewDef = preview && `preview: {${serialize(preview)}}`

const combinedDefinitions = [serializedProps, fieldsDef, ofDef, previewDef]
Expand Down

0 comments on commit 6b9f910

Please sign in to comment.