Rearrange code flow

This commit is contained in:
Raymond Hill 2022-11-04 11:08:41 -04:00
parent 123cb0b0f4
commit 36bfa27c30
No known key found for this signature in database
GPG Key ID: 25E1490B761470C2
1 changed files with 4 additions and 3 deletions

View File

@ -1634,10 +1634,11 @@ Parser.prototype.SelectorCompiler = class {
}
break;
}
case 'PseudoClassSelector':
case 'PseudoElementSelector':
out.push(data.type === 'PseudoClassSelector' ? ':' : '::');
out.push(data.name);
out.push(':');
/* fall through */
case 'PseudoClassSelector':
out.push(`:${data.name}`);
if ( Array.isArray(part.args) ) {
const arg = this.astSerialize(part.args);
if ( typeof arg !== 'string' ) { return; }