mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Limit: Prevent negative limit (#94237)
This commit is contained in:
parent
797da67467
commit
d0abb08f31
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user