Skip to content

Commit

Permalink
Fix javascript sync_socket
Browse files Browse the repository at this point in the history
  • Loading branch information
LivInTheLookingGlass committed Oct 25, 2016
1 parent 9cf40ec commit ebdc977
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions js_src/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -172,14 +172,9 @@ m.sync_socket = class sync_socket extends mesh.mesh_socket {
*/
let new_meta = new m.metatuple(this.id, base.getUTC());
let s_key = new Buffer(key);
let s_data = (data) ? new Buffer(data) : new Buffer('')
this.__store(s_key, s_data, new_meta);
if (!data) {
this.send([s_key, ''], undefined, base.flags.store);
}
else {
let s_data = new Buffer(data);
this.send([s_key, s_data], undefined, base.flags.store);
}
this.send([s_key, s_data], undefined, base.flags.store);
}

update(update_dict) {
Expand Down Expand Up @@ -210,4 +205,4 @@ m.sync_socket = class sync_socket extends mesh.mesh_socket {
*/
this.set(key);
}
}
}

0 comments on commit ebdc977

Please sign in to comment.