Skip to content

Commit

Permalink
correct logic
Browse files Browse the repository at this point in the history
  • Loading branch information
domoritz committed Jul 31, 2024
1 parent da3dc55 commit 2587eff
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/compile/legend/parse.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {DatumDef, FieldDef, getFieldOrDatumDef, isFieldDef, MarkPropDatumDef, Ma
import {LegendInternal, LEGEND_SCALE_CHANNELS} from '../../legend';
import {normalizeTimeUnit} from '../../timeunit';
import {GEOJSON} from '../../type';
import {deleteNestedProperty, hasKey, isEmpty, keys, varName} from '../../util';
import {deleteNestedProperty, isEmpty, keys, varName} from '../../util';
import {mergeTitleComponent} from '../common';
import {guideEncodeEntry} from '../guide';
import {isUnitModel, Model} from '../model';
Expand Down Expand Up @@ -135,7 +135,7 @@ export function parseLegendForChannel(model: UnitModel, channel: NonPositionScal
const value = property in legendRules ? legendRules[property](ruleParams) : (legend as any)[property];
if (value !== undefined) {
const explicit = isExplicit(value, property, legend, model.fieldDef(channel));
if (explicit || hasKey(config.legend, property)) {
if (explicit || (config.legend as any)[property] === undefined) {
legendCmpt.set(property, value, explicit);
}
}
Expand Down

0 comments on commit 2587eff

Please sign in to comment.