Skip to content

Commit

Permalink
fix: remove unsafe optional chaining of schema filter
Browse files Browse the repository at this point in the history
  • Loading branch information
Aerilym committed Oct 1, 2024
1 parent 195fbab commit 8cac3e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/sanity-cms/lib/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ export function createSanityConfig({
/** Combine the singleton schemas and the regular schemas, removing duplicates. */
const combinedSchemas = [
...singletonSchemas,
...schemas?.filter(
...schemas.filter(
(schema) => !singletonSchemas.some((singleton) => singleton.name === schema.name)
),
];
Expand Down

0 comments on commit 8cac3e1

Please sign in to comment.