We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 5d0f9c8 + 147ab67 commit 22050b8Copy full SHA for 22050b8
static/scripts/styled-components-fix.js
@@ -2,8 +2,8 @@
2
(function() {
3
const styleElements = document.querySelectorAll('style[data-styled]');
4
styleElements.forEach(style => {
5
- if (style.innerHTML === '') {
+ if (style.sheet && style.sheet.cssRules.length === 0) {
6
style.parentNode.removeChild(style);
7
}
8
});
9
-})();
+})();
0 commit comments