Skip to content

Commit

Permalink
ensure we fallback to '' for backwards compatibility reasons
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinMalfait committed Nov 3, 2022
1 parent bf28bf6 commit aa979d6
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/lib/setupContextUtils.js
Expand Up @@ -608,7 +608,11 @@ function buildPluginApi(tailwindConfig, context, { variantList, variantMap, offs
}

return variantFn(
args?.value === sharedState.NONE ? options.values.DEFAULT : args?.value,
args?.value === sharedState.NONE
? options.values.DEFAULT
: // Falling back to args if it is a string, otherwise '' for older intellisense
// (JetBrains) plugins.
args?.value ?? (typeof args === 'string' ? args : ''),
modifiersEnabled ? { modifier: args?.modifier, container } : { container }
)
},
Expand Down

0 comments on commit aa979d6

Please sign in to comment.