             :tx-listen
             (fn [tx-data root-cursor]
                 (history/save-state (:new-state tx-data)) ; to enable the timeline
-                (put! tx-chan [tx-data root-cursor]))}))}))
+                (when (is-master @current-branch) (put! tx-chan [tx-data root-cursor])))}))}))
 
 ; (om/root
 ;   (fn [app owner]

;   {:target (. js/document (getElementById "inspector"))})

(defn send-update [state]
  (.send @socket (pr-str (select-keys (state :tx-data) [:new-value :path]))))

(let [sub-chan (chan)]

             conn (js/WebSocket. (str "ws://" host ":" port "/ws"))]
            (set! (.-onmessage conn) (fn [e] 
              (when-let [state (read-string (.-data e))]
                (.log js/console e)
                (history/save-to-master state)
                (when (is-master @current-branch) (reset! app-state state)))))
            (reset! socket conn)) ; set the socket, so that it can be used for sending things
        (when-not (nil? res) (reset! app-state res))
        (om/root app-view app-state
