Variables: fixes error when setting adhoc variables values (#23580)

This commit is contained in:
Hugo Häggmark 2020-04-15 08:17:51 +02:00 committed by GitHub
parent 80f40040b0
commit 0091885b13
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,7 +3,7 @@ import angular, { auto, ILocationService, IPromise, IQService } from 'angular';
import _ from 'lodash';
// Utils & Services
import coreModule from 'app/core/core_module';
import { variableTypes } from './types';
import { VariableActions, variableTypes } from './types';
import { Graph } from 'app/core/utils/dag';
import { TemplateSrv } from 'app/features/templating/template_srv';
import { TimeSrv } from 'app/features/dashboard/services/TimeSrv';
@ -344,9 +344,9 @@ export class VariableSrv {
}
}
isVariableUrlValueDifferentFromCurrent(variable: any, urlValue: any) {
isVariableUrlValueDifferentFromCurrent(variable: VariableActions, urlValue: any) {
// lodash _.isEqual handles array of value equality checks as well
return !_.isEqual(variable.current.value, urlValue);
return !_.isEqual(variable.getValueForUrl(), urlValue);
}
updateUrlParamsWithCurrentVariables() {