Skip to content

Commit

Permalink
Improve compatibility with fake timers.
Browse files Browse the repository at this point in the history
  • Loading branch information
Hexagon committed Mar 4, 2023
1 parent ccf9a7c commit d20ca70
Show file tree
Hide file tree
Showing 12 changed files with 13 additions and 17 deletions.
3 changes: 1 addition & 2 deletions dist/croner.cjs

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions dist/croner.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/croner.min.cjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/croner.min.cjs.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/croner.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/croner.min.js.map

Large diffs are not rendered by default.

3 changes: 1 addition & 2 deletions dist/croner.umd.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/croner.umd.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/croner.umd.min.js.map

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "croner",
"version": "6.0.2-dev.1",
"version": "6.0.2-dev.2",
"description": "Trigger functions and/or evaluate cron expressions in JavaScript. No dependencies. Most features. All environments.",
"author": "Hexagon <github.com/hexagon>",
"homepage": "https://hexagon.github.io/croner",
Expand Down
3 changes: 1 addition & 2 deletions src/croner.js
Original file line number Diff line number Diff line change
Expand Up @@ -421,8 +421,7 @@ Cron.prototype._trigger = async function (initiationDate) {
await this.fn(this, this.options.context);
} catch (_e) {
if (isFunction(this.options.catch)) {
// Do not await catch, even if it is synchronous
setTimeout(() => this.options.catch(_e, this), 0);
this.options.catch(_e, this);
}
}
} else {
Expand Down

0 comments on commit d20ca70

Please sign in to comment.