Skip to content

Commit

Permalink
refactor: check for undefined to detect whether WoT instance was created
Browse files Browse the repository at this point in the history
  • Loading branch information
danielpeintner committed Jan 11, 2024
1 parent aa15371 commit 16ec287
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/servient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ export default class Servient {

// will return WoT object
public async start(): Promise<typeof WoT> {
if (this.#wotInstance != null) {
if (this.#wotInstance !== undefined) {
debug("Servient started already -> nop -> returning previous WoT implementation");
return this.#wotInstance;
}

Check warning on line 219 in packages/core/src/servient.ts

View check run for this annotation

Codecov / codecov/patch

packages/core/src/servient.ts#L217-L219

Added lines #L217 - L219 were not covered by tests
Expand Down

0 comments on commit 16ec287

Please sign in to comment.