mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-10 10:12:34 -05:00
Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 (#6381)
* Merge from vscode 8e0f348413f4f616c23a88ae30030efa85811973 * disable strict null check
This commit is contained in:
@@ -85,19 +85,7 @@ export function detectModeId(modelService: IModelService, modeService: IModeServ
|
||||
}
|
||||
|
||||
// otherwise fallback to path based detection
|
||||
let path: string | undefined;
|
||||
if (resource.scheme === Schemas.data) {
|
||||
const metadata = DataUri.parseMetaData(resource);
|
||||
path = metadata.get(DataUri.META_DATA_LABEL);
|
||||
} else {
|
||||
path = resource.path.toLowerCase();
|
||||
}
|
||||
|
||||
if (path) {
|
||||
return modeService.getModeIdByFilepathOrFirstLine(path);
|
||||
}
|
||||
|
||||
return null; // finally - we do not know the mode id
|
||||
return modeService.getModeIdByFilepathOrFirstLine(resource);
|
||||
}
|
||||
|
||||
export function cssEscape(val: string): string {
|
||||
|
||||
Reference in New Issue
Block a user