Skip to content

Commit

Permalink
Merge pull request #70 from qlik-oss/hva/modifiers-forward-3
Browse files Browse the repository at this point in the history
fix(modifiers): only restore base if there is no base
  • Loading branch information
quanho committed Feb 13, 2020
2 parents ede5787 + df1c5ff commit 86094fc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -634,7 +634,7 @@ function updateIfChanged({ oldProperties, newProperties, model }) {
);
}

function findActiveModifier(measure) {
function getBaseFromActiveModifier(measure) {
const { modifiers } = measure.qDef;
for (let i = 0; i < modifiers.length; i++) {
const modifier = modifiers[i];
Expand All @@ -653,7 +653,9 @@ function applyMeasureModifiers({
}) {
let activeModifiersPerMeasure = 0;
// For forward and backward compatibility
findActiveModifier(measure);
if (!measureBase.isValid(measure)) {
getBaseFromActiveModifier(measure);
}
if (!measureBase.isValid(measure)) {
measureBase.initBase(measure, true);
}
Expand Down

0 comments on commit 86094fc

Please sign in to comment.