Limit: Prevent negative limit (#94237)

This commit is contained in:
Drew Slobodnjak authored and GitHub committed 2024-10-04 12:05:16 -07:00
1 parent 797da67467
commit d0abb08f31
1 file changed
+4
@@ -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 {