Skip to content

Commit

Permalink
Arguably better.
Browse files Browse the repository at this point in the history
  • Loading branch information
danfuzz committed Dec 9, 2024
1 parent 86be1be commit 792fcf8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ Breaking changes:
* `BaseComponent`: Renamed `CONFIG_CLASS` to `configClass`.

Other notable changes:
* None.
* `loggy-intf`:
* `LoggyIntf`: New static methods `expectInstance()` and
`expectInstanceOrNull()`, to avoid more ad-hoc checks.

### v0.8.5 -- 2024-12-06

Expand Down
2 changes: 1 addition & 1 deletion src/loggy-intf/export/IntfLogger.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export class IntfLogger {
* @throws {Error} Thrown if `logger` is not actually a logger or `null`.
*/
static expectInstanceOrNull(logger) {
return (logger === null) ? logger : this.expectInstance(logger);
return (logger === null) ? null : this.expectInstance(logger);
}

/**
Expand Down

0 comments on commit 792fcf8

Please sign in to comment.