Update for latest TypeScript

This seems to be a clear TypeScript bug, but oh well, the workaround
is likely to be better code anyway.
This commit is contained in:
Guangcong Luo
2021-11-18 22:31:18 -05:00
parent 6cd9a91b53
commit b2ec75af6f

View File

@@ -790,7 +790,7 @@ class FormatDropdownPanel extends PSRoomPanel {
let curSection = '';
let curColumnNum = 0;
let curColumn: (FormatData | {id: '', section: string})[] = [];
let curColumn: (FormatData | {id: null, section: string})[] = [];
const columns = [curColumn];
for (const format of formats) {
if (format.column !== curColumnNum) {
@@ -803,7 +803,7 @@ class FormatDropdownPanel extends PSRoomPanel {
if (format.section !== curSection) {
curSection = format.section;
if (curSection) {
curColumn.push({id: '', section: curSection});
curColumn.push({id: null, section: curSection});
}
}
curColumn.push(format);