Skip to content

Commit

Permalink
fix(modifiers): only restore base if there is no base
Browse files Browse the repository at this point in the history
  • Loading branch information
quanho committed Feb 13, 2020
1 parent f6dc158 commit df1c5ff
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/index.js
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 df1c5ff

Please sign in to comment.