Skip to content

Commit 72a7ece

Browse files
author
Benjamin Pasero
committed
💄 optional services
1 parent 1cc26ce commit 72a7ece

2 files changed

Lines changed: 2 additions & 5 deletions

File tree

src/vs/editor/contrib/find/findController.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import { MenuId } from 'vs/platform/actions/common/actions';
2020
import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService';
2121
import { IContextKey, IContextKeyService, ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey';
2222
import { IContextViewService } from 'vs/platform/contextview/browser/contextView';
23-
import { optional } from 'vs/platform/instantiation/common/instantiation';
2423
import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding';
2524
import { KeybindingWeight } from 'vs/platform/keybinding/common/keybindingsRegistry';
2625
import { IStorageService, StorageScope } from 'vs/platform/storage/common/storage';
@@ -371,7 +370,6 @@ export class CommonFindController extends Disposable implements IEditorContribut
371370

372371
public async getGlobalBufferTerm(): Promise<string> {
373372
if (this._editor.getOption(EditorOption.find).globalFindClipboard
374-
&& this._clipboardService
375373
&& this._editor.hasModel()
376374
&& !this._editor.getModel().isTooLargeForSyncing()
377375
) {
@@ -382,7 +380,6 @@ export class CommonFindController extends Disposable implements IEditorContribut
382380

383381
public setGlobalBufferTerm(text: string): void {
384382
if (this._editor.getOption(EditorOption.find).globalFindClipboard
385-
&& this._clipboardService
386383
&& this._editor.hasModel()
387384
&& !this._editor.getModel().isTooLargeForSyncing()
388385
) {
@@ -406,7 +403,7 @@ export class FindController extends CommonFindController implements IFindControl
406403
@INotificationService private readonly _notificationService: INotificationService,
407404
@IStorageService _storageService: IStorageService,
408405
@IStorageKeysSyncRegistryService private readonly _storageKeysSyncRegistryService: IStorageKeysSyncRegistryService,
409-
@optional(IClipboardService) clipboardService: IClipboardService,
406+
@IClipboardService clipboardService: IClipboardService,
410407
) {
411408
super(editor, _contextKeyService, _storageService, clipboardService);
412409
this._widget = null;

src/vs/platform/telemetry/common/telemetryService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ export class TelemetryService implements ITelemetryService {
8989
}
9090

9191
private _updateUserOptIn(): void {
92-
const config = this._configurationService.getValue<any>(TELEMETRY_SECTION_ID);
92+
const config = this._configurationService?.getValue<any>(TELEMETRY_SECTION_ID);
9393
this._userOptIn = config ? config.enableTelemetry : this._userOptIn;
9494
}
9595

0 commit comments

Comments
 (0)