diff --git a/src/tasks/purgecss/lib/context.ts b/src/tasks/purgecss/lib/context.ts index e27ae41..f402ce5 100644 --- a/src/tasks/purgecss/lib/context.ts +++ b/src/tasks/purgecss/lib/context.ts @@ -190,10 +190,7 @@ export class HtmlContext { if (node.childNodes.length === 0) return const style = new StyleInline(node.childNodes[0] as parse5.TextNode) if (this._inHead) { - const idAttr = node.attrs.find(a => a.name === 'id') - style.id = idAttr !== undefined && idAttr.value !== '' - ? idAttr.value - : createStyleId(style.read()) + style.id = createStyleId(style.read()) this.mapper.createStyleLink(style, this) } this.styles.push(style)