Uncaught TypeError: Cannot read property 'isActive' of undefined (fixes #27257)

This commit is contained in:
Benjamin Pasero 2017-05-25 12:16:33 +02:00
parent 847fde97f9
commit 4486772aba

View file

@ -212,7 +212,7 @@ export class TabsTitleControl extends TitleControl {
private updateDropFeedback(element: HTMLElement, isDND: boolean, index?: number): void {
const isTab = (typeof index === 'number');
const isActiveTab = isTab && this.context.isActive(this.context.getEditor(index));
const isActiveTab = isTab && this.context && this.context.isActive(this.context.getEditor(index));
// Background
const noDNDBackgroundColor = isTab ? this.getColor(isActiveTab ? TAB_ACTIVE_BACKGROUND : TAB_INACTIVE_BACKGROUND) : null;