Skip to content

Commit 92514c4

Browse files
committed
Fix a few more issues related to microsoft#81574
1 parent 30120e4 commit 92514c4

3 files changed

Lines changed: 8 additions & 5 deletions

File tree

src/vs/workbench/common/editor/editorGroup.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export class EditorGroup extends Disposable {
102102
private focusRecentEditorAfterClose: boolean | undefined;
103103

104104
constructor(
105-
labelOrSerializedGroup: ISerializedEditorGroup,
105+
labelOrSerializedGroup: ISerializedEditorGroup | undefined,
106106
@IInstantiationService private readonly instantiationService: IInstantiationService,
107107
@IConfigurationService private readonly configurationService: IConfigurationService
108108
) {

src/vs/workbench/contrib/feedback/browser/feedbackStatusbarItem.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,11 @@ export class FeedbackStatusbarConribution extends Disposable implements IWorkben
7171
if (!this.dropdown) {
7272
const statusContainr = document.getElementById('status.feedback');
7373
if (statusContainr) {
74-
this.dropdown = this._register(this.instantiationService.createInstance(FeedbackDropdown, statusContainr.getElementsByClassName('octicon').item(0), {
74+
const icon = statusContainr.getElementsByClassName('octicon').item(0) as HTMLElement | null;
75+
if (!icon) {
76+
throw new Error('Could not find icon');
77+
}
78+
this.dropdown = this._register(this.instantiationService.createInstance(FeedbackDropdown, icon, {
7579
contextViewProvider: this.contextViewService,
7680
feedbackService: this.instantiationService.createInstance(TwitterFeedbackService),
7781
onFeedbackVisibilityChange: visible => this.entry!.update(this.getStatusEntry(visible))

src/vs/workbench/contrib/webview/browser/webviewEditorService.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { IDisposable, toDisposable, UnownedDisposable } from 'vs/base/common/lif
88
import { values } from 'vs/base/common/map';
99
import { URI } from 'vs/base/common/uri';
1010
import { ExtensionIdentifier } from 'vs/platform/extensions/common/extensions';
11-
import { createDecorator, IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
11+
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
1212
import { GroupIdentifier } from 'vs/workbench/common/editor';
1313
import { IWebviewService, WebviewOptions, WebviewContentOptions } from 'vs/workbench/contrib/webview/browser/webview';
1414
import { IEditorGroup, IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService';
@@ -131,7 +131,6 @@ export class WebviewEditorService implements IWebviewEditorService {
131131

132132
constructor(
133133
@IEditorService private readonly _editorService: IEditorService,
134-
@IInstantiationService private readonly _instantiationService: IInstantiationService,
135134
@IEditorGroupsService private readonly _editorGroupService: IEditorGroupsService,
136135
@IWebviewService private readonly _webviewService: IWebviewService,
137136
@IWorkspaceContextService private readonly _contextService: IWorkspaceContextService,
@@ -150,7 +149,7 @@ export class WebviewEditorService implements IWebviewEditorService {
150149
): WebviewInput {
151150
const webview = this.createWebiew(id, extension, options);
152151

153-
const webviewInput = this._instantiationService.createInstance(WebviewInput, id, viewType, title, new UnownedDisposable(webview), undefined);
152+
const webviewInput = new WebviewInput(id, viewType, title, new UnownedDisposable(webview));
154153
this._editorService.openEditor(webviewInput, {
155154
pinned: true,
156155
preserveFocus: showOptions.preserveFocus,

0 commit comments

Comments
 (0)