Skip to content

Commit 91f55b0

Browse files
Update packages/ember-css-modules/lib/htmlbars-plugin/utils.js
Co-authored-by: Dan Freeman <[email protected]>
1 parent 9f8ba47 commit 91f55b0

File tree

1 file changed

+5
-1
lines changed
  • packages/ember-css-modules/lib/htmlbars-plugin

1 file changed

+5
-1
lines changed

packages/ember-css-modules/lib/htmlbars-plugin/utils.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ function updateStringValue(node, updater) {
2121
node.chars = updater(node.chars);
2222
} else if (node.type === 'StringLiteral') {
2323
node.value = updater(node.value);
24-
setValue(node, updater(getValue(node)));
24+
// Avoid `original` deprecation in Ember 5.9+
25+
let originalDesc = Object.getOwnPropertyDescriptor(node, 'original');
26+
if (originalDesc && originalDesc.value) {
27+
node.original = updater(node.original);
28+
}
2529
} else {
2630
throw new Error('Unknown node type ' + node.type + ' (not a string?)');
2731
}

0 commit comments

Comments
 (0)