Skip to content

Commit

Permalink
fix(server): only swallow module not found errors when importing docu…
Browse files Browse the repository at this point in the history
…ment
  • Loading branch information
rexxars committed Aug 9, 2022
1 parent b99418c commit cc2b3c8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/@sanity/server/src/renderDocument.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,10 @@ function tryLoadDocumentComponent(studioRootPath: string) {
path: componentPath,
}
} catch (err) {
// Allow this to fail
// Allow "not found" errors
if (err.code !== 'MODULE_NOT_FOUND') {
throw err
}
}
}

Expand Down

0 comments on commit cc2b3c8

Please sign in to comment.