Skip to content

Commit

Permalink
fixed undefined bug
Browse files Browse the repository at this point in the history
  • Loading branch information
Drakae committed Sep 25, 2024
1 parent 596375f commit 492defe
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,14 @@ export class ContextTableProvider {
}
//determine hazards
const hazards: string[] = [];
const hazardList = context.list.refs;
hazardList.forEach((hazard) => {
const hazardList = context.list?.refs;
hazardList?.forEach((hazard) => {
if (hazard.ref?.name) {
hazards.push(hazard.ref.name);
}
});
// create rule/uca
if (rule.action.ref?.name && rule.system.ref?.name) {
if (rule.action?.ref?.name && rule.system?.ref?.name) {
rules.push({
id: context.name,
controlAction: { controller: rule.system.ref!.name, action: rule.action.ref!.name },
Expand Down

0 comments on commit 492defe

Please sign in to comment.