Skip to content

Commit 5f19d63

Browse files
committed
chore: clean up duplicate check
1 parent 5d0c085 commit 5f19d63

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

packages/@lwc/engine-core/src/framework/rendering.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -604,11 +604,11 @@ function applyStyleScoping(elm: Element, owner: VM, renderer: RendererAPI) {
604604

605605
// Set the class name for `*.scoped.css` style scoping.
606606
const scopeToken = getScopeTokenClass(owner, /* legacy */ false);
607-
if (!isNull(scopeToken) && !isValidScopeToken(scopeToken)) {
608-
// See W-16614556
609-
throw new Error('stylesheet token must be a valid string');
610-
}
611607
if (!isNull(scopeToken)) {
608+
if (!isValidScopeToken(scopeToken)) {
609+
// See W-16614556
610+
throw new Error('stylesheet token must be a valid string');
611+
}
612612
// TODO [#2762]: this dot notation with add is probably problematic
613613
// probably we should have a renderer api for just the add operation
614614
getClassList(elm).add(scopeToken);

0 commit comments

Comments
 (0)