Limit: Prevent negative limit (#94237)

This commit is contained in:
Drew Slobodnjak 2024-10-04 12:05:16 -07:00 committed by GitHub
parent 797da67467
commit d0abb08f31
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -34,6 +34,10 @@ export const limitTransformer: DataTransformerInfo<LimitTransformerOptions> = {
limit = options.limitField;
}
}
// Prevent negative limit
if (limit < 0) {
limit = 0;
}
return data.map((frame) => {
if (frame.length > limit) {
return {