Skip to content

Commit

Permalink
Mark that preferredMode can be undefined
Browse files Browse the repository at this point in the history
As part of the fix for #81574, I discovered that a large number of callers were already passing `undefined` for this value. This fix just marks the type as possibly undefined as well
  • Loading branch information
mjbvz committed Sep 28, 2019
1 parent 74e4847 commit f2d4172
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil
private contentEncoding: string; // encoding as reported from disk
private preferredEncoding: string; // encoding as chosen by the user

private preferredMode: string; // mode as chosen by the user
private preferredMode: string | undefined; // mode as chosen by the user

private versionId: number;
private bufferSavedVersionId: number;
Expand Down Expand Up @@ -108,7 +108,7 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil
constructor(
resource: URI,
preferredEncoding: string,
preferredMode: string,
preferredMode: string | undefined,
@INotificationService private readonly notificationService: INotificationService,
@IModeService modeService: IModeService,
@IModelService modelService: IModelService,
Expand Down

0 comments on commit f2d4172

Please sign in to comment.