diff --git a/node_modules/styled-jsx/dist/lib/stylesheet.js b/node_modules/styled-jsx/dist/lib/stylesheet.js index e43e025..e20e44d 100644 --- a/node_modules/styled-jsx/dist/lib/stylesheet.js +++ b/node_modules/styled-jsx/dist/lib/stylesheet.js @@ -201,7 +201,7 @@ var StyleSheet = /*#__PURE__*/function () { } else { var tag = this._tags[index]; invariant(tag, "rule at index `" + index + "` not found"); - tag.parentNode.removeChild(tag); + if(tag.parentNode) tag.parentNode.removeChild(tag); this._tags[index] = null; } }; @@ -212,7 +212,7 @@ var StyleSheet = /*#__PURE__*/function () { if (this._isBrowser) { this._tags.forEach(function (tag) { - return tag && tag.parentNode.removeChild(tag); + return tag && tag.parentNode && tag.parentNode.removeChild(tag); }); this._tags = [];