diff --git a/lib/cron.js b/lib/cron.js index 5cd273ea..86189ee2 100644 --- a/lib/cron.js +++ b/lib/cron.js @@ -2,7 +2,10 @@ if (typeof define === 'function' && define.amd) { define(['luxon'], factory); } else if (typeof exports === 'object') { - module.exports = factory(require('luxon'), require('child_process')); + module.exports = factory( + require('luxon'), + typeof window === 'undefined' ? require('child_process') : {} + ); } else { root.Cron = factory(root.luxon); }