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 d666342..43b2e1d 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;
                }