Skip to content

Commit 806ad65

Browse files
authored
Merge pull request #136 from Kitware/fix-ts-error
fix(useColorAndOpacity): set as null
2 parents 387f611 + 2a6496f commit 806ad65

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/core/modules/useColorAndOpacity.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ export default function useColorAndOpacity<
3737
const property = getActor().getProperty();
3838

3939
colorTransferFunctions.forEach((fn, component) => {
40-
property.setRGBTransferFunction(component, fn);
40+
property.setRGBTransferFunction(component, fn ?? null);
4141
});
4242

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

5454
scalarOpacityFunctions.forEach((fn, component) => {
55-
property.setScalarOpacity(component, fn);
55+
property.setScalarOpacity(component, fn ?? null);
5656
});
5757

5858
return () => {

0 commit comments

Comments
 (0)