Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -532,8 +532,13 @@ function safeGetOf(schemaType: SchemaType): readonly SchemaType[] | undefined {
const arrayOf = (schemaType as ArraySchemaType).of
return Array.isArray(arrayOf) ? arrayOf : undefined
}
} catch {
// Sanity schema getters can throw -- ignore
} catch (error) {
// Sanity schema getters can throw, which is ignored. A stack overflow
// is rethrown: swallowing it lets the recursion return early and hides
// the overflow the cycle scenario expects.
if (error instanceof RangeError) {
throw error
}
}
return undefined
}
Expand Down
Loading