getPreferredEditorId return undefined instead of null

This commit is contained in:
Matt Bierner
2019-07-15 15:03:33 -07:00
parent 711eca07d1
commit 2b07856867

View File

@@ -380,12 +380,12 @@ export abstract class EditorInput extends Disposable implements IEditorInput {
* Returns the preferred editor for this input. A list of candidate editors is passed in that whee registered
* for the input. This allows subclasses to decide late which editor to use for the input on a case by case basis.
*/
getPreferredEditorId(candidates: string[]): string | null {
getPreferredEditorId(candidates: string[]): string | undefined {
if (candidates.length > 0) {
return candidates[0];
}
return null;
return undefined;
}
/**