requested on the same team. It reports and ignores benign duplicates,
and at present does the same with conflicts. It could instead throw an
error in that case.
}
}
- // Stash this for subsequent inspection
- this.team.config().query = query;
+ var old = this.team.config().query;
+ if (!old) {
+ // Stash this for subsequent inspection
+ this.team.config().query = query;
+ } else if (old === query) {
+ this.log("duplicate autosearch: '" + query + "': ignoring");
+ return;
+ } else {
+ this.log("conflicting autosearch: '" + query + "' vs '" + old + "': ignoring");
+ return;
+ }
this.team.queue("ready").subscribe(function() {
// Postpone testing for the configuration items: these are not