Skip to content

Commit

Permalink
Patch window undefined error in css-render
Browse files Browse the repository at this point in the history
  • Loading branch information
pilotmoon committed Nov 16, 2023
1 parent c3763f0 commit 1c3cec3
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions patches/css-render+0.13.9.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
diff --git a/node_modules/css-render/lib/mount.js b/node_modules/css-render/lib/mount.js
index e1523a0..a78142d 100644
--- a/node_modules/css-render/lib/mount.js
+++ b/node_modules/css-render/lib/mount.js
@@ -5,7 +5,7 @@ exports.mount = exports.unmount = exports.setCount = exports.getCount = void 0;
const hash_1 = require("./hash");
const render_1 = require("./render");
const utils_1 = require("./utils");
-if (window) {
+if (typeof window !== "undefined" && window) {
window.__cssrContext = {};
}
function getCount(el) {

0 comments on commit 1c3cec3

Please sign in to comment.