From 47d5d7969b9ad6f77b47e5de4d84e8c5ced5bc34 Mon Sep 17 00:00:00 2001 From: Aaron Lampros Date: Wed, 26 Oct 2016 14:44:55 -0400 Subject: [PATCH 1/2] Use window.document Allows for webpack server rendering. --- velocity.js | 2 +- velocity.ui.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/velocity.js b/velocity.js index 199661c0..6e1ab279 100644 --- a/velocity.js +++ b/velocity.js @@ -4130,7 +4130,7 @@ }); return Velocity; - }((window.jQuery || window.Zepto || window), window, document); + }((window.jQuery || window.Zepto || window), window, window.document); })); /****************** diff --git a/velocity.ui.js b/velocity.ui.js index addb7b97..6b234588 100644 --- a/velocity.ui.js +++ b/velocity.ui.js @@ -790,5 +790,5 @@ Velocity(sequence[0]); }; - }((window.jQuery || window.Zepto || window), window, document); + }((window.jQuery || window.Zepto || window), window, window.document); })); From 1b861790566c7ef677459a8702c70f8a8c1f3892 Mon Sep 17 00:00:00 2001 From: Aaron Lampros Date: Thu, 27 Oct 2016 10:07:13 -0400 Subject: [PATCH 2/2] Check window exists --- velocity.js | 2 +- velocity.ui.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/velocity.js b/velocity.js index 6e1ab279..e94584bd 100644 --- a/velocity.js +++ b/velocity.js @@ -4130,7 +4130,7 @@ }); return Velocity; - }((window.jQuery || window.Zepto || window), window, window.document); + }((window.jQuery || window.Zepto || window), window, (window ? window.document : undefined)); })); /****************** diff --git a/velocity.ui.js b/velocity.ui.js index 6b234588..3ec13dba 100644 --- a/velocity.ui.js +++ b/velocity.ui.js @@ -790,5 +790,5 @@ Velocity(sequence[0]); }; - }((window.jQuery || window.Zepto || window), window, window.document); + }((window.jQuery || window.Zepto || window), window, (window ? window.document : undefined)); }));