Skip to content

Commit

Permalink
add guard in painting loop
Browse files Browse the repository at this point in the history
  • Loading branch information
sashankaryal committed Jan 8, 2025
1 parent 7d8fbfc commit a814e18
Showing 1 changed file with 18 additions and 12 deletions.
30 changes: 18 additions & 12 deletions app/packages/looker/src/worker/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -171,18 +171,24 @@ const processLabels = async (
if (!label) {
continue;
}
if (painterFactory[cls]) {
painterPromises.push(
painterFactory[cls](
prefix ? prefix + field : field,
label,
coloring,
customizeColorSetting,
colorscale,
labelTagColors,
selectedLabelTags
)
);

if (
activePaths.length &&
activePaths.includes(`${prefix ?? ""}${field}`)
) {
if (painterFactory[cls]) {
painterPromises.push(
painterFactory[cls](
prefix ? prefix + field : field,
label,
coloring,
customizeColorSetting,
colorscale,
labelTagColors,
selectedLabelTags
)
);
}
}
}
}
Expand Down

0 comments on commit a814e18

Please sign in to comment.