Skip to content

Commit bb0c011

Browse files
fix(css): type the print context the declaration memo reads
1 parent c6ce8c9 commit bb0c011

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

‎lib/css/syntax-parser.js‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5209,7 +5209,8 @@ const _walkRule = (node, parent, index, writer) => {
52095209
}
52105210
_exitNode(node, parent, index, b, writer);
52115211
if (_declarationMemoKey !== "") {
5212-
const printed = /** @type {PrintContext} */ (writer).get(node);
5212+
const context = /** @type {PrintContext} */ (writer);
5213+
const printed = context.get(node);
52135214
if (!_mayBeMergeableName(node)) {
52145215
/** @type {Map<string, string>} */ (_declarationMemo).set(
52155216
_declarationMemoKey,
@@ -5220,7 +5221,7 @@ const _walkRule = (node, parent, index, writer) => {
52205221
_declarationMemoKey,
52215222
printed
52225223
);
5223-
if (_valueComponents(A, node, writer).length === 1) {
5224+
if (_valueComponents(A, node, context).length === 1) {
52245225
/** @type {Set<string>} */ (_singleValueKeys).add(_declarationMemoKey);
52255226
}
52265227
}

0 commit comments

Comments
 (0)