// sequences
tmpPortalEntries.forEach((col) => {
if (col !== undefined) {
- this.portalEntries.push(col);
- col.forEach((entry) => {
+ const filtered = col.filter(x => x !== undefined);
+ this.portalEntries.push(filtered);
+ filtered.forEach((entry) => {
if (entry.entry_type() === 'header') {
this.portalHeaders[this.portalEntries.length - 1] = entry;
}
});
}
});
+ // supply an empty header entry in case a column was
+ // defined without a header
+ this.portalEntries.forEach((col, i) => {
+ if (this.portalHeaders.length <= i) {
+ this.portalHeaders[i] = undefined;
+ }
+ });
}
);
}