1
0
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:
Alexander Skvortsov
2020-09-18 12:52:43 -04:00
committed by Franz Liedke
parent b954e79ec8
commit ccd2b0ee0b

View File

@@ -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);