Skip to content

Commit 7fd1e1f

Browse files
committed
[schema] Fix error when guessing preview config for files
1 parent 998a05d commit 7fd1e1f

File tree

1 file changed

+1
-1
lines changed
  • packages/@sanity/schema/src/types

1 file changed

+1
-1
lines changed

packages/@sanity/schema/src/types/file.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ export const FileType = {
5353
})
5454
})
5555

56-
lazyGetter(parsed, 'preview', createPreviewGetter(subTypeDef))
56+
lazyGetter(parsed, 'preview', createPreviewGetter(Object.assign({}, subTypeDef, {fields})))
5757

5858
return subtype(parsed)
5959

0 commit comments

Comments
 (0)