diff options
author | Jon Barlow <jon.barlow@fitbit.com> | 2018-03-11 18:04:46 +0000 |
---|---|---|
committer | Jon Barlow <jon.barlow@fitbit.com> | 2018-03-11 18:04:46 +0000 |
commit | 21475330fc2e1de979aa1dc5456accc7ebc84db6 (patch) | |
tree | 8bc704d91a87ff9ad879aa1c99d9f64e6dedf0ea /companion | |
parent | 6d721d94b0c1e75f80e1d54dcfa976239188b31a (diff) |
Updated for Versa
Diffstat (limited to 'companion')
-rw-r--r-- | companion/index.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/companion/index.js b/companion/index.js index 963fd09..e4aac6e 100644 --- a/companion/index.js +++ b/companion/index.js @@ -3,10 +3,9 @@ import * as messaging from "messaging"; settingsStorage.onchange = function(evt) { if (messaging.peerSocket.readyState === messaging.peerSocket.OPEN) { - let data = JSON.parse(evt.newValue); - messaging.peerSocket.send(data["values"][0].value); - } else { - console.log("companion - no connection"); + if (evt.key === "theme") { + let data = JSON.parse(evt.newValue); + messaging.peerSocket.send(data["values"][0].value); + } } } - |