Skip to content

Commit

Permalink
don't require child_process in browsers
Browse files Browse the repository at this point in the history
  • Loading branch information
sheepa authored and sheerlox committed Oct 3, 2022
1 parent a09b521 commit 751d3d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/cron.js
Original file line number Diff line number Diff line change
Expand Up @@ -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') : {}));

Check failure on line 5 in lib/cron.js

View workflow job for this annotation

GitHub Actions / lint-and-test (14.x, ubuntu-latest)

Replace `require('luxon'),·(typeof·window·===·'undefined'·?·require('child_process')·:·{})` with `⏎↹↹↹require('luxon'),⏎↹↹↹typeof·window·===·'undefined'·?·require('child_process')·:·{}⏎↹↹`

Check failure on line 5 in lib/cron.js

View workflow job for this annotation

GitHub Actions / lint-and-test (18.x, ubuntu-latest)

Replace `require('luxon'),·(typeof·window·===·'undefined'·?·require('child_process')·:·{})` with `⏎↹↹↹require('luxon'),⏎↹↹↹typeof·window·===·'undefined'·?·require('child_process')·:·{}⏎↹↹`
} else {
root.Cron = factory(root.luxon);
}
Expand Down

0 comments on commit 751d3d7

Please sign in to comment.