use array.includes instead of array.indexOf
This commit is contained in:
parent
0f8ace4836
commit
53c9517a4a
|
@ -46,7 +46,7 @@ const Timeline = {
|
||||||
const result = {}
|
const result = {}
|
||||||
if (this.pinnedStatusIds && this.pinnedStatusIds.length > 0) {
|
if (this.pinnedStatusIds && this.pinnedStatusIds.length > 0) {
|
||||||
for (let status of this.timeline.visibleStatuses) {
|
for (let status of this.timeline.visibleStatuses) {
|
||||||
if (this.pinnedStatusIds.indexOf(status.id) === -1) {
|
if (!this.pinnedStatusIds.includes(status.id)) {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
result[status.id] = true
|
result[status.id] = true
|
||||||
|
|
Loading…
Reference in New Issue