Fix adjustMetaInfo limit retrieval (#33631)

This commit is contained in:
Giordano Ricci 2021-05-03 11:55:53 +01:00 committed by GitHub
parent 1be7d1a733
commit 3c79138d21
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -475,7 +475,7 @@ function adjustMetaInfo(logsModel: LogsModel, visibleRangeMs?: number, requested
let logsModelMeta = [...logsModel.meta!];
const limitIndex = logsModelMeta.findIndex((meta) => meta.label === LIMIT_LABEL);
const limit = limitIndex && logsModelMeta[limitIndex]?.value;
const limit = limitIndex >= 0 && logsModelMeta[limitIndex]?.value;
if (limit && limit > 0) {
let metaLimitValue;