Skip to content

Commit

Permalink
Merge pull request #7974 from jrjohnson/clear-ast-deprecation
Browse files Browse the repository at this point in the history
Clear Glimmer Parser Deprecations
  • Loading branch information
stopfstedt committed Jul 17, 2024
2 parents c059026 + 9721bdd commit 9647cb5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/ilios-common/lib/get-errors-for-transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module.exports = class GetErrorsForTransform {
}

transformNode(node) {
if (node.path.original === 'get-errors-for') {
if (node.path.type === 'PathExpression' && node.path.original === 'get-errors-for') {
if (!node.params[0] || node.params[0].type !== 'PathExpression') {
throw new Error(
'the (get-errors-for) helper requires a path to be passed in as its first parameter, received: ' +
Expand Down
2 changes: 1 addition & 1 deletion packages/ilios-common/lib/has-error-for-transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ module.exports = class HasErrorForTransform {
}

transformNode(node) {
if (node.path.original === 'has-error-for') {
if (node.path.type === 'PathExpression' && node.path.original === 'has-error-for') {
if (!node.params[0] || node.params[0].type !== 'PathExpression') {
throw new Error(
'the (has-error-for) helper requires a path to be passed in as its first parameter, received: ' +
Expand Down
2 changes: 1 addition & 1 deletion packages/ilios-common/lib/set-transform.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ module.exports = class SetTransform {
}

transformNode(node) {
if (node.path.original === 'set') {
if (node.path.type === 'PathExpression' && node.path.original === 'set') {
if (!node.params[0] || node.params[0].type !== 'PathExpression') {
throw new Error(
'the (set) helper requires a path to be passed in as its first parameter, received: ' +
Expand Down

0 comments on commit 9647cb5

Please sign in to comment.