diff --git a/lib/cron.js b/lib/cron.js index 22994f90..e7998593 100644 --- a/lib/cron.js +++ b/lib/cron.js @@ -2,7 +2,7 @@ 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); }