strict null checks: debugToolbar

This commit is contained in:
isidor
2019-03-07 23:32:07 +01:00
parent 1592c3bcb6
commit 31e7dc1722
2 changed files with 7 additions and 3 deletions
+1
View File
@@ -245,6 +245,7 @@
"./vs/workbench/contrib/debug/browser/debugEditorActions.ts",
"./vs/workbench/contrib/debug/browser/debugEditorModelManager.ts",
"./vs/workbench/contrib/debug/browser/debugQuickOpen.ts",
"./vs/workbench/contrib/debug/browser/debugToolbar.ts",
"./vs/workbench/contrib/debug/browser/debugStatus.ts",
"./vs/workbench/contrib/debug/browser/exceptionWidget.ts",
"./vs/workbench/contrib/debug/browser/linkDetector.ts",
@@ -184,8 +184,11 @@ export class DebugToolbar extends Themable implements IWorkbenchContribution {
}
private storePosition(): void {
const position = parseFloat(dom.getComputedStyle(this.$el).left) / window.innerWidth;
this.storageService.store(DEBUG_TOOLBAR_POSITION_KEY, position, StorageScope.GLOBAL);
const left = dom.getComputedStyle(this.$el).left;
if (left) {
const position = parseFloat(left) / window.innerWidth;
this.storageService.store(DEBUG_TOOLBAR_POSITION_KEY, position, StorageScope.GLOBAL);
}
}
protected updateStyles(): void {
@@ -304,7 +307,7 @@ export class DebugToolbar extends Themable implements IWorkbenchContribution {
}
return true;
}).sort((first, second) => first.weight - second.weight);
}).sort((first, second) => (first.weight || 0) - (second.weight || 0));
fillInActionBarActions(menu, undefined, actions, () => false);
if (debugService.getViewModel().isMultiSessionView()) {