]> git.sesse.net Git - remoteglot/commitdiff
Fix another bug with sound play with JSON deltas they are applied in-place).
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 19 Jun 2015 22:50:22 +0000 (00:50 +0200)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Fri, 19 Jun 2015 22:50:22 +0000 (00:50 +0200)
www/js/remoteglot.js

index d666342966f316a7ed1b751824a439a2cef46d04..43b2e1ddbb7c304b2450349fbaef79e23e355d92 100644 (file)
@@ -139,7 +139,8 @@ var request_update = function() {
                var num_viewers = xhr.getResponseHeader('X-RGNV');
                var new_data;
                if (Array.isArray(data)) {
-                       new_data = JSON_delta.patch(current_analysis_data, data);
+                       new_data = JSON.parse(JSON.stringify(current_analysis_data));
+                       JSON_delta.patch(new_data, data);
                } else {
                        new_data = data;
                }