diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/caldav/connection.js | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/caldav/connection.js b/lib/caldav/connection.js index 8869571..c3a2588 100644 --- a/lib/caldav/connection.js +++ b/lib/caldav/connection.js @@ -1,7 +1,12 @@ (function(module, ns) { - var Caldav = ns.require('caldav'), - XHR = ns.require('xhr'); + var Caldav; + if (typeof(window) !== 'undefined') { + Caldav = window.Caldav; + } else { + Caldav = ns.require('caldav'); + } + var XHR = ns.require('xhr'); /** * Connection objects contain |