mirror of
https://github.com/outline/outline.git
synced 2026-11-22 05:51:43 +03:00
fix: Deleted users appear in mention menu before search query (#9003)
This commit is contained in:
1 parent
6e9092bcaf
commit
e1e334dd5f
1 file changed
+8
-1
@@ -99,7 +99,14 @@ export default abstract class Store<T extends Model> {
|
||||
const normalized = deburr((query ?? "").trim().toLocaleLowerCase());
|
||||
|
||||
if (!normalized) {
|
||||
return this.orderedData.slice(0, options?.maxResults);
|
||||
return this.orderedData
|
||||
.filter((item) => {
|
||||
if ("deletedAt" in item && item.deletedAt) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
})
|
||||
.slice(0, options?.maxResults);
|
||||
}
|
||||
|
||||
return this.orderedData
|
||||
|
||||
Reference in new issue
Block a user