File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
packages/@tailwindcss-upgrade/src/codemods/config Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -144,10 +144,16 @@ async function migrateTheme(
144144
145145 // We don't read from the `--content` key in v4 for the content-* utilities
146146 // so we must convert these to custom utilities instead.
147- if ( 'content' in resolvedConfig . theme ) {
147+ if (
148+ 'content' in resolvedConfig . theme &&
149+ resolvedConfig . theme . content !== null &&
150+ typeof resolvedConfig . theme . content === 'object'
151+ ) {
148152 let rules : AstNode [ ] = [ ]
149153
150154 for ( let [ key , value ] of Object . entries ( resolvedConfig . theme . content ) ) {
155+ if ( typeof value !== 'string' ) continue
156+
151157 rules . push (
152158 atRule ( '@utility' , `content-${ key } ` , [
153159 decl ( '--tw-content' , `${ value } ` ) ,
You can’t perform that action at this time.
0 commit comments