From: Steinar H. Gunderson Date: Fri, 19 Jun 2015 22:50:22 +0000 (+0200) Subject: Fix another bug with sound play with JSON deltas they are applied in-place). X-Git-Url: https://git.sesse.net/?p=remoteglot;a=commitdiff_plain;h=ab94a7c05a495c1d8f9ea30e2268bbc72f17b303;ds=sidebyside Fix another bug with sound play with JSON deltas they are applied in-place). --- diff --git a/www/js/remoteglot.js b/www/js/remoteglot.js index d666342..43b2e1d 100644 --- a/www/js/remoteglot.js +++ b/www/js/remoteglot.js @@ -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; }