From 6a408452a41e0a14e2b15605a56cce5779c774e7 Mon Sep 17 00:00:00 2001 From: Abhijit Srivastava Date: Fri, 1 Feb 2019 09:47:09 +0530 Subject: [PATCH] Update For Server side rendering This update is necessary as while server-side rendering you do not have 'window' object. Its just a small check that makes it run with an error. --- src/wow.coffee | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wow.coffee b/src/wow.coffee index ca144fe..faf622e 100644 --- a/src/wow.coffee +++ b/src/wow.coffee @@ -193,7 +193,7 @@ class @WOW @animate => @customStyle(box, hidden, duration, delay, iteration) animate: (-> - if 'requestAnimationFrame' of window + if typeof window != 'undefined' and 'requestAnimationFrame' of window (callback) -> window.requestAnimationFrame callback else