Skip to content

Commit

Permalink
Fix Node[my] hack
Browse files Browse the repository at this point in the history
  • Loading branch information
ai committed Jun 14, 2021
1 parent 7ea0c9b commit 8b4a8b1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
5 changes: 4 additions & 1 deletion lib/lazy-result.js
Expand Up @@ -136,7 +136,10 @@ class LazyResult {
this.error = error
}

if (root && !root[my]) Container.rebuild(root)
if (root && !root[my]) {
// istanbul ignore next
Container.rebuild(root)
}
}

this.result = new Result(processor, root, opts)
Expand Down
3 changes: 2 additions & 1 deletion lib/node.js
@@ -1,8 +1,8 @@
'use strict'

let { isClean, my } = require('./symbols')
let CssSyntaxError = require('./css-syntax-error')
let Stringifier = require('./stringifier')
let { isClean } = require('./symbols')
let stringify = require('./stringify')

function cloneNode(obj, parent) {
Expand Down Expand Up @@ -36,6 +36,7 @@ class Node {
constructor(defaults = {}) {
this.raws = {}
this[isClean] = false
this[my] = true

for (let name in defaults) {
if (name === 'nodes') {
Expand Down

0 comments on commit 8b4a8b1

Please sign in to comment.