mirror of
https://github.com/discourse/discourse.git
synced 2025-09-06 09:10:25 +08:00
FIX: prevents create row to be displayed if term is in displayed list
This commit is contained in:
parent
ba2f01c0bd
commit
9b680fc45c
1 changed files with 5 additions and 1 deletions
|
@ -1,4 +1,4 @@
|
||||||
const { run } = Ember;
|
const { run, get } = Ember;
|
||||||
import { ajax } from "discourse/lib/ajax";
|
import { ajax } from "discourse/lib/ajax";
|
||||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||||
|
|
||||||
|
@ -47,6 +47,10 @@ export default Ember.Mixin.create({
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (this.get("asyncContent").map(c => get(c, "id")).includes(term)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue