aboutsummaryrefslogtreecommitdiffstats
path: root/caldav.js
diff options
context:
space:
mode:
Diffstat (limited to 'caldav.js')
-rw-r--r--caldav.js9
1 files changed, 7 insertions, 2 deletions
diff --git a/caldav.js b/caldav.js
index 0f21ea6..1882c88 100644
--- a/caldav.js
+++ b/caldav.js
@@ -2744,8 +2744,13 @@ function write (chunk) {
(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