fix timespan referencing to same values (#56601) (#56612)

This commit is contained in:
Shahzad 2020-02-03 19:00:40 +01:00 committed by GitHub
parent 479223b0a1
commit 4aa727560a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -4,6 +4,7 @@
* you may not use this file except in compliance with the Elastic License.
*/
import moment from 'moment';
import { APICaller } from 'kibana/server';
import { CursorPagination } from '../adapter_types';
import { INDEX_NAMES } from '../../../../../common/constants';
@ -97,7 +98,7 @@ export class QueryContext {
// behavior.
const tsEnd = parseRelativeDate(this.dateRangeEnd, { roundUp: true })!;
const tsStart = tsEnd.subtract(5, 'minutes');
const tsStart = moment(tsEnd).subtract(5, 'minutes');
return {
range: {