Skip to content

Commit 5f459e5

Browse files
committed
fix: pass the actual value, not the function
1 parent c1746b5 commit 5f459e5

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/action-types/frontend/cssRule.js

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,12 @@ InteractRunner.addActionConfig( {
55
cssRule: {
66
initAction: action => {
77
const property = action.getValue( 'property' )
8-
const value = () => {
9-
// Get the value, pass the style name as the context.
10-
return action.getValue( 'value', action.getValue( 'property' ) )
11-
}
8+
// Get the value, pass the style name as the context.
9+
const value = action.getValue( 'value', action.getValue( 'property' ) )
10+
1211
// Validate the CSS rule first.
1312
// Add optional 'px' to allow values without unit which default to px.
14-
if ( CSS.supports( property, value() ) || CSS.supports( property, value() + 'px' ) ) {
13+
if ( CSS.supports( property, value ) || CSS.supports( property, value + 'px' ) ) {
1514
return action.initActionAnimation( {
1615
[ property ]: value,
1716
// This makes sure the value is re-calculated for dynamic values.

0 commit comments

Comments
 (0)