Skip to content

Commit

Permalink
return isLow when pin is reversed
Browse files Browse the repository at this point in the history
  • Loading branch information
andy-haynes committed Nov 23, 2019
1 parent b4cc08d commit f4cac56
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/composables/pin_toggle.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,11 @@ const PinToggle = stampit(Configure.noPrivatize(), EventLogger, {
},
methods: {
isOn() {
return this.config.pin.isHigh();
const { pin, reversed } = this.config;
if (reversed) {
return pin.isLow();
}
return pin.isHigh();
},

logPinEvent(event, error) {
Expand Down

0 comments on commit f4cac56

Please sign in to comment.