@@ -77,8 +77,14 @@ const thisPlugin: PluginType = createPlugin.withOptions<CapsizePluginOptions>(
77
77
// Font-size
78
78
matchUtilities (
79
79
{
80
- // @ts -expect-error -- Extra custom properties mismatches base type.
81
80
text ( value : string | [ string , string | FontSizeOptions ] ) {
81
+ /**
82
+ * For some reason, tailwindcss-intellisense passes
83
+ * object and undefined values in here, so we handle
84
+ * those cases so it doesn't break IDE plugins.
85
+ */
86
+ if ( ! value || isPlainObject ( value ) ) return { }
87
+
82
88
let [ fontSize , options ] = Array . isArray ( value ) ? value : [ value ]
83
89
let fontSizeActual = normalizeValue ( fontSize , rootSize )
84
90
let { lineHeight } = (
@@ -87,7 +93,7 @@ const thisPlugin: PluginType = createPlugin.withOptions<CapsizePluginOptions>(
87
93
88
94
return {
89
95
'--font-size-px' : String ( fontSizeActual ) ,
90
- ...lineHeightProperties ( lineHeight , rootSize ) ,
96
+ ...( lineHeight ? lineHeightProperties ( lineHeight , rootSize ) : { } ) ,
91
97
}
92
98
} ,
93
99
} ,
@@ -100,11 +106,10 @@ const thisPlugin: PluginType = createPlugin.withOptions<CapsizePluginOptions>(
100
106
// Line-height
101
107
matchUtilities (
102
108
{
103
- // @ts -expect-error -- Extra custom properties mismatches base type.
104
109
leading ( value : string | string [ ] ) {
105
110
let lineHeight = normalizeThemeValue ( 'lineHeight' , value ) as string
106
111
107
- return lineHeightProperties ( lineHeight , rootSize )
112
+ return lineHeight ? lineHeightProperties ( lineHeight , rootSize ) : { }
108
113
} ,
109
114
} ,
110
115
{
0 commit comments