ensure we fallback to '' for backwards compatibility reasons

This commit is contained in:
Robin Malfait 2022-11-03 17:20:47 +01:00
parent bf28bf61c1
commit aa979d645f
No known key found for this signature in database
GPG key ID: 92F53D68B9041AFE

View file

@ -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 }
)
},