diff --git a/daterangepicker.js b/daterangepicker.js index 4048310c..5f7d304b 100644 --- a/daterangepicker.js +++ b/daterangepicker.js @@ -28,7 +28,7 @@ // Browser globals root.daterangepicker = factory(root.moment, root.jQuery); } -}(this, function(moment, $) { +}(typeof window !== 'undefined' ? window : this, function(moment, $) { var DateRangePicker = function(element, options, cb) { //default settings for options