Skip to content

Commit

Permalink
Fix getAllPropertyNodesByName
Browse files Browse the repository at this point in the history
Don't require the property value to be of type object
  • Loading branch information
davelopez committed Jun 20, 2024
1 parent d117fb8 commit 6ab97c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion server/packages/server-common/src/ast/nodeManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export class ASTNodeManager {
if (!root) return result;

this.visit((node) => {
if (node.type === "property" && node.keyNode.value === name && node.valueNode?.type === "object") {
if (node.type === "property" && node.keyNode.value === name) {
result.push(node);
}
return true;
Expand Down

0 comments on commit 6ab97c0

Please sign in to comment.