aboutsummaryrefslogtreecommitdiff
path: root/companion
diff options
context:
space:
mode:
Diffstat (limited to 'companion')
-rw-r--r--companion/index.js9
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);
+ }
}
}
-