Skip to content

Commit

Permalink
fix: use supported ternary
Browse files Browse the repository at this point in the history
  • Loading branch information
sgoossens committed Dec 12, 2022
1 parent f71d859 commit 82aaaba
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/sinon/assert.js
Expand Up @@ -121,7 +121,7 @@ function createAssertObject(shouldLimitAssertionLogs) {

fail: function fail(message) {
if (shouldLimitAssertionLogs) {
message.substring(0, assertionLogLimit ?? DEFAULT_LOG_LIMIT);
message.substring(0, assertionLogLimit ? assertionLogLimit : DEFAULT_LOG_LIMIT);
}
var error = new Error(message);
error.name = this.failException || assert.failException;
Expand Down

0 comments on commit 82aaaba

Please sign in to comment.