mirror of
https://github.com/discourse/discourse.git
synced 2025-01-31 02:49:29 +08:00
It's a set of Tip objects, not ids
This commit is contained in:
parent
62c30e0b5f
commit
108aff663e
|
@ -13,11 +13,12 @@ export default class UserTips extends Service {
|
||||||
#shouldRenderSet = new TrackedSet();
|
#shouldRenderSet = new TrackedSet();
|
||||||
|
|
||||||
#updateRenderedId() {
|
#updateRenderedId() {
|
||||||
if (this.#availableTips.has(this.#renderedId)) {
|
const tipsArray = [...this.#availableTips];
|
||||||
|
if (tipsArray.find((tip) => tip.id === this.#renderedId)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
const newId = [...this.#availableTips]
|
const newId = tipsArray
|
||||||
.sortBy("priority")
|
.sortBy("priority")
|
||||||
.reverse()
|
.reverse()
|
||||||
.find((tip) => {
|
.find((tip) => {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user