Skip to content

Commit ce46152

Browse files
committed
refactor(core): ignore className
1 parent 9edbd07 commit ce46152

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

packages/qwik/src/core/shared/jsx/jsx-node.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ export class JSXNodeImpl<T = unknown> implements JSXNodeInternal<T> {
8282
}
8383
}
8484

85-
// TODO let the optimizer do this instead
8685
if ('className' in this.varProps) {
8786
this.varProps.class = this.varProps.className;
8887
this.varProps.className = undefined;
@@ -93,6 +92,7 @@ export class JSXNodeImpl<T = unknown> implements JSXNodeInternal<T> {
9392
);
9493
}
9594
}
95+
// TODO let the optimizer do this instead
9696
if (this.constProps && 'className' in this.constProps) {
9797
this.constProps.class = this.constProps.className;
9898
this.constProps.className = undefined;

packages/qwik/src/core/shared/utils/scoped-styles.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ export const styleContent = (styleId: string): string => {
66
};
77

88
export function hasClassAttr(props: Props): boolean {
9-
return 'class' in props || 'className' in props;
9+
return 'class' in props;
1010
}
1111

1212
export function isClassAttr(key: string): boolean {
13-
return key === 'class' || key === 'className';
13+
return key === 'class';
1414
}
1515

1616
export function getScopedStyleIdsAsPrefix(scopedStyleIds: Set<string>): string {

0 commit comments

Comments
 (0)