From aa979d645f8bf4108c5fc938d7c0ba085b654c31 Mon Sep 17 00:00:00 2001 From: Robin Malfait Date: Thu, 3 Nov 2022 17:20:47 +0100 Subject: [PATCH] ensure we fallback to `''` for backwards compatibility reasons --- src/lib/setupContextUtils.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/lib/setupContextUtils.js b/src/lib/setupContextUtils.js index 78df6486a575..0d092b3517e7 100644 --- a/src/lib/setupContextUtils.js +++ b/src/lib/setupContextUtils.js @@ -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 } ) },