From 981f3bcff2f98e75c3078e32fc593c8d5f370ff4 Mon Sep 17 00:00:00 2001 From: William Bowers Date: Tue, 29 Apr 2014 16:37:34 -0700 Subject: [PATCH] Fixes a reference error when window isn't the global context. This is the case in node (which we found running automated tests on views that require Pace). window isn't the global context so setting window.Pace doesn't make Pace referencable. --- pace.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pace.js b/pace.js index acc5e050..e081aab7 100644 --- a/pace.js +++ b/pace.js @@ -202,8 +202,10 @@ })(); + var Pace = window.Pace || {}; + if (window.Pace == null) { - window.Pace = {}; + window.Pace = Pace; } extend(Pace, Evented.prototype);