This repository was archived by the owner on Jan 30, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -128,31 +128,31 @@ export const camelToKebabCase = (property: string) => {
128128 const afterProp = property . slice ( index + prop . length ) ;
129129 const afterNotKebab = afterProp . replace ( / _ / g, '-' ) . toLowerCase ( ) ;
130130
131- if ( property . startsWith ( 'notClass' ) ) {
131+ if ( prop === 'notClass' ) {
132132 return `:not(.${ afterNotKebab } )` ;
133133 }
134134
135- if ( property . startsWith ( 'not' ) ) {
135+ if ( prop === 'not' ) {
136136 if ( property . includes ( 'not(' ) ) {
137137 return `:not${ afterProp . toLowerCase ( ) } ` ;
138138 } else {
139139 return `:not(${ afterProp . toLowerCase ( ) } )` ;
140140 }
141141 }
142142
143- if ( property . startsWith ( 'hasClass' ) ) {
143+ if ( prop === 'hasClass' ) {
144144 return `:has(.${ afterNotKebab } )` ;
145145 }
146146
147- if ( property . startsWith ( 'hasChild' ) ) {
147+ if ( prop === 'hasChild' ) {
148148 return `:has(> ${ afterProp . toLowerCase ( ) } )` ;
149149 }
150150
151- if ( property . startsWith ( 'hasPlus' ) ) {
151+ if ( prop === 'hasPlus' ) {
152152 return `:has(+ ${ afterProp . toLowerCase ( ) } )` ;
153153 }
154154
155- if ( property . startsWith ( 'has' ) ) {
155+ if ( prop === 'has' ) {
156156 if ( property . includes ( 'has(' ) ) {
157157 return `:has${ afterProp . toLowerCase ( ) } ` ;
158158 } else {
You can’t perform that action at this time.
0 commit comments