提交 31e7dc17 编写于 作者: I isidor

strict null checks: debugToolbar

上级 1592c3bc
......@@ -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()) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册