Skip to content

Commit

Permalink
fix: Simplify embedded logic now that 'auto' is gone. #536
Browse files Browse the repository at this point in the history
  • Loading branch information
rumpeltux committed Jun 9, 2020
1 parent 7585f86 commit b9097a6
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions lib/miio/Model.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class Model {
/**
* @param {object} options
* @param {string} options.identifier
* @param {boolean|string} options.embedded
* @param {boolean} options.embedded
* @param {object} [options.config]
* @param {string} [options.config.ip]
* @param {string} [options.config.deviceId]
Expand All @@ -20,11 +20,7 @@ class Model {
this.identifier = VACUUM_MODEL_PROVIDER();
}

if (options.embedded === "auto") {
this.embedded = true;
} else {
this.embedded = options.embedded === true;
}
this.embedded = !!options.embedded;

options.config = options.config || {};
this.config = {
Expand Down

0 comments on commit b9097a6

Please sign in to comment.