提交 05116584 编写于 作者: B Benjamin Pasero

better fix for label duplicates

上级 f80e1c91
......@@ -274,7 +274,7 @@ export class TabsTitleControl extends TitleControl {
// Mark duplicates and shorten their descriptions
const labelDuplicates = mapLabelToDuplicates.values();
labelDuplicates.forEach(duplicates => {
if (duplicates.length > 1 && duplicates.every(duplicate => !!duplicate.editor.getDescription())) {
if (duplicates.length > 1 && duplicates.every(duplicate => typeof duplicate.editor.getDescription() === 'string')) {
let shortenedDescriptions = shorten(duplicates.map(duplicate => duplicate.editor.getDescription()));
duplicates.forEach((duplicate, i) => {
duplicate.description = shortenedDescriptions[i];
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册