From f02a6eb848666d90f357056d8630d45b98fb0705 Mon Sep 17 00:00:00 2001 From: Alquen Sarmiento Date: Wed, 10 Dec 2025 10:24:36 +0800 Subject: [PATCH] fix: pass the actual value, not the function --- src/action-types/frontend/cssRule.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/action-types/frontend/cssRule.js b/src/action-types/frontend/cssRule.js index f51d349..22fa2bf 100644 --- a/src/action-types/frontend/cssRule.js +++ b/src/action-types/frontend/cssRule.js @@ -5,13 +5,12 @@ InteractRunner.addActionConfig( { cssRule: { initAction: action => { const property = action.getValue( 'property' ) - const value = () => { - // Get the value, pass the style name as the context. - return action.getValue( 'value', action.getValue( 'property' ) ) - } + // Get the value, pass the style name as the context. + const value = action.getValue( 'value', action.getValue( 'property' ) ) + // Validate the CSS rule first. // Add optional 'px' to allow values without unit which default to px. - if ( CSS.supports( property, value() ) || CSS.supports( property, value() + 'px' ) ) { + if ( CSS.supports( property, value ) || CSS.supports( property, value + 'px' ) ) { return action.initActionAnimation( { [ property ]: value, // This makes sure the value is re-calculated for dynamic values.