Skip to content

Commit

Permalink
Fix AggregateError compat
Browse files Browse the repository at this point in the history
  • Loading branch information
lxsmnsyc committed Oct 18, 2023
1 parent 582766e commit df7dbe9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/seroval/src/core/base/async.ts
Original file line number Diff line number Diff line change
Expand Up @@ -754,6 +754,7 @@ export default abstract class BaseAsyncParserContext extends BaseParserContext {
}
if (
(currentFeatures & Feature.AggregateError)
&& typeof AggregateError !== 'undefined'
&& (currentClass === AggregateError || current instanceof AggregateError)
) {
return this.parseAggregateError(id, current as unknown as AggregateError);
Expand Down
1 change: 1 addition & 0 deletions packages/seroval/src/core/base/stream.ts
Original file line number Diff line number Diff line change
Expand Up @@ -430,6 +430,7 @@ export default abstract class BaseStreamParserContext extends BaseSyncParserCont
}
if (
(currentFeatures & Feature.AggregateError)
&& typeof AggregateError !== 'undefined'
&& (currentClass === AggregateError || current instanceof AggregateError)
) {
return this.parseAggregateError(id, current as unknown as AggregateError);
Expand Down
1 change: 1 addition & 0 deletions packages/seroval/src/core/base/sync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -624,6 +624,7 @@ export default abstract class BaseSyncParserContext extends BaseParserContext {
}
if (
(currentFeatures & Feature.AggregateError)
&& typeof AggregateError !== 'undefined'
&& (currentClass === AggregateError || current instanceof AggregateError)
) {
return this.parseAggregateError(id, current as unknown as AggregateError);
Expand Down

0 comments on commit df7dbe9

Please sign in to comment.