Skip to content

Commit

Permalink
fix(hydration): ident name parsing
Browse files Browse the repository at this point in the history
  • Loading branch information
kripod committed Jul 26, 2020
1 parent 958d8a0 commit d4a4e32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/otion/src/createInstance.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ export function createInstance(): OtionInstance {
if (cssRule.type === 1 /* CSSRule.STYLE_RULE */) {
const { selectorText } = cssRule as CSSStyleRule;
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
const identName = /[0-9a-z]/.exec(selectorText.slice(2 /* "._" */))![0];
const identName = /^[0-9a-z]+/.exec(selectorText.slice(2 /* "._" */))![0];
ruleIndexesByIdentName.set(identName, ruleIndexesByIdentName.size);
} else {
hydrateScopedSubtree((cssRule as CSSGroupingRule).cssRules[0]);
Expand Down

0 comments on commit d4a4e32

Please sign in to comment.