Skip to content

Commit 1a3c877

Browse files
authored
Merge pull request #614 from adobe/fixSmells
fix: smells
2 parents ecc2cc8 + cb35674 commit 1a3c877

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/vega-spec-builder/src/marks/markUtils.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,10 +193,10 @@ export const getColorProductionRuleSignalString = (
193193
return colorRule.signal;
194194
}
195195
if ('scale' in colorRule && 'field' in colorRule) {
196-
return `scale('${colorRule.scale}', datum.${colorRule.field})`;
196+
return `scale('${colorRule.scale as string}', datum.${colorRule.field as string})`;
197197
}
198198
if ('value' in colorRule && colorRule.value) {
199-
return `'${colorRule.value}'`;
199+
return `'${colorRule.value as string}'`;
200200
}
201201
return '';
202202
};

packages/vega-spec-builder/src/scatter/scatterMarkUtils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ export const getSelectRingSize = (size: SymbolSizeFacet): NumericValueRef => {
187187
return { value: Math.pow(Math.sqrt(baseSize.value) + 4, 2) };
188188
}
189189
if ('scale' in baseSize && 'field' in baseSize) {
190-
return { signal: `pow(sqrt(scale('${baseSize.scale}', datum.${baseSize.field})) + 4, 2)` };
190+
return { signal: `pow(sqrt(scale('${baseSize.scale as string}', datum.${baseSize.field as string})) + 4, 2)` };
191191
}
192192
return baseSize;
193193
};

0 commit comments

Comments
 (0)