mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Ensure we always get all providers (#3724)
This commit is contained in:
@@ -321,16 +321,13 @@ export class MainThreadNotebookDocumentsAndEditors extends Disposable implements
|
|||||||
let model = new NotebookInputModel(uri, undefined, trusted, undefined);
|
let model = new NotebookInputModel(uri, undefined, trusted, undefined);
|
||||||
let providerId = options.providerId;
|
let providerId = options.providerId;
|
||||||
let providers: string[] = undefined;
|
let providers: string[] = undefined;
|
||||||
if (!providerId)
|
// Ensure there is always a sensible provider ID for this file type
|
||||||
{
|
providers = getProvidersForFileName(uri.fsPath, this._notebookService);
|
||||||
// Ensure there is always a sensible provider ID for this file type
|
// Try to use a non-builtin provider first
|
||||||
providers = getProvidersForFileName(uri.fsPath, this._notebookService);
|
if (providers) {
|
||||||
// Try to use a non-builtin provider first
|
providerId = providers.find(p => p !== DEFAULT_NOTEBOOK_PROVIDER);
|
||||||
if (providers) {
|
if (!providerId) {
|
||||||
providerId = providers.find(p => p !== DEFAULT_NOTEBOOK_PROVIDER);
|
providerId = model.providerId;
|
||||||
if (!providerId) {
|
|
||||||
providerId = model.providerId;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
model.providers = providers;
|
model.providers = providers;
|
||||||
|
|||||||
Reference in New Issue
Block a user