Skip to content

Commit 2a6496f

Browse files
committed
fix(useColorAndOpacity): set as null
1 parent 387f611 commit 2a6496f

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)