We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4f0b878 commit 520c969Copy full SHA for 520c969
src/ResizeSensor.js
@@ -14,6 +14,10 @@
14
}
15
}(this, function () {
16
17
+ //Make sure it does not throw in a SSR (Server Side Rendering) situation
18
+ if (typeof window === "undefined") {
19
+ return null;
20
+ }
21
// Only used for the dirty checking, so the event callback count is limted to max 1 call per fps per sensor.
22
// In combination with the event based resize sensor this saves cpu time, because the sensor is too fast and
23
// would generate too many unnecessary events.
0 commit comments