Server version: 1.1.3
Client version: 1.1.3
Unsubscribing and then resubscribing the same watch() Observable will cause records to be added to the collection even when they are already present.
var t = horizon('tasks');
t.store({title: 'test'}).subscribe(function (stored) {
var id = stored.id;
var watch = t.findAll(id).watch();
var sub = watch.subscribe(function (r) {
console.log(r);
});
setTimeout(function () {
sub.unsubscribe();
sub = watch.subscribe(function (r) {
console.log(r);
});
}, 1000);
});