Skip to content

Commit

Permalink
Make sure annotations are never handled as a node
Browse files Browse the repository at this point in the history
  • Loading branch information
lukastaegert committed Feb 26, 2019
1 parent 115d76b commit 41f01cb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ast/nodes/shared/Node.ts
Expand Up @@ -150,7 +150,7 @@ export class NodeBase implements ExpressionNode {
hasEffects(options: ExecutionPathOptions): boolean {
for (const key of this.keys) {
const value = (<GenericEsTreeNode>this)[key];
if (value === null) continue;
if (value === null || key === 'annotations') continue;
if (Array.isArray(value)) {
for (const child of value) {
if (child !== null && child.hasEffects(options)) return true;
Expand Down Expand Up @@ -180,7 +180,7 @@ export class NodeBase implements ExpressionNode {
this.included = true;
for (const key of this.keys) {
const value = (<GenericEsTreeNode>this)[key];
if (value === null) continue;
if (value === null || key === 'annotations') continue;
if (Array.isArray(value)) {
for (const child of value) {
if (child !== null) child.include(includeAllChildrenRecursively);
Expand Down Expand Up @@ -246,7 +246,7 @@ export class NodeBase implements ExpressionNode {
render(code: MagicString, options: RenderOptions) {
for (const key of this.keys) {
const value = (<GenericEsTreeNode>this)[key];
if (value === null) continue;
if (value === null || key === 'annotations') continue;
if (Array.isArray(value)) {
for (const child of value) {
if (child !== null) child.render(code, options);
Expand Down

0 comments on commit 41f01cb

Please sign in to comment.