Skip to content

Commit

Permalink
review comments resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
pkunduGL committed Sep 9, 2023
1 parent 2f2ee95 commit 08a983c
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions projects/aca-content/src/lib/services/node-actions.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -591,17 +591,18 @@ export class NodeActionsService {
}

isRuleFolder(node: Node): boolean {
const nodeAspects = this.getNodeAspectNames(node);
return nodeAspects.includes('rule:rules');
if (node) {
const nodeAspects = this.getNodeAspectNames(node);
return nodeAspects?.includes('rule:rules');
}
}

isLinkFolder(node: Node): boolean {
const nodeType = node.nodeType;
return nodeType === 'app:folderlink';
return node?.nodeType === 'app:folderlink';
}

private getNodeAspectNames(node: Node): string[] {
return node.aspectNames ? node.aspectNames : [];
return node?.aspectNames || [];
}

public getNewNameFrom(name: string, baseName?: string) {
Expand Down

0 comments on commit 08a983c

Please sign in to comment.