mirror of
https://github.com/flarum/core.git
synced 2025-08-05 07:57:46 +02:00
Revert diff reduction change
Sometimes, items passed to listItems might be null. We still need that filter check
This commit is contained in:
committed by
Franz Liedke
parent
b954e79ec8
commit
ccd2b0ee0b
@@ -9,7 +9,7 @@ function withoutUnnecessarySeparators(items) {
|
||||
const newItems = [];
|
||||
let prevItem;
|
||||
|
||||
items.forEach((item, i) => {
|
||||
items.filter(Boolean).forEach((item, i) => {
|
||||
if (!isSeparator(item) || (prevItem && !isSeparator(prevItem) && i !== items.length - 1)) {
|
||||
prevItem = item;
|
||||
newItems.push(item);
|
||||
|
Reference in New Issue
Block a user