Skip to content

Commit

Permalink
Merge pull request #136 from Kitware/fix-ts-error
Browse files Browse the repository at this point in the history
fix(useColorAndOpacity): set as null
  • Loading branch information
floryst authored Jun 17, 2024
2 parents 387f611 + 2a6496f commit 806ad65
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/core/modules/useColorAndOpacity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default function useColorAndOpacity<
const property = getActor().getProperty();

colorTransferFunctions.forEach((fn, component) => {
property.setRGBTransferFunction(component, fn);
property.setRGBTransferFunction(component, fn ?? null);
});

return () => {
Expand All @@ -52,7 +52,7 @@ export default function useColorAndOpacity<
const property = getActor().getProperty();

scalarOpacityFunctions.forEach((fn, component) => {
property.setScalarOpacity(component, fn);
property.setScalarOpacity(component, fn ?? null);
});

return () => {
Expand Down

0 comments on commit 806ad65

Please sign in to comment.