mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Some MSSQL strict null check fixes (#22383)
This commit is contained in:
@@ -37,22 +37,17 @@ export default class ContextProvider {
|
||||
}
|
||||
|
||||
public onDashboardOpen(e: azdata.DashboardDocument): void {
|
||||
let iscloud: boolean;
|
||||
let edition: number;
|
||||
let serverMajorVersion: number;
|
||||
let isCloud: boolean = false;
|
||||
let edition: number | undefined;
|
||||
let serverMajorVersion: number | undefined;
|
||||
if (e.profile.providerName.toLowerCase() === 'mssql' && !types.isUndefinedOrNull(e.serverInfo) && !types.isUndefinedOrNull(e.serverInfo.engineEditionId)) {
|
||||
if (isCloudEditions.some(i => i === e.serverInfo.engineEditionId)) {
|
||||
iscloud = true;
|
||||
} else {
|
||||
iscloud = false;
|
||||
}
|
||||
|
||||
isCloud = isCloudEditions.some(i => i === e.serverInfo.engineEditionId);
|
||||
edition = e.serverInfo.engineEditionId;
|
||||
serverMajorVersion = e.serverInfo.serverMajorVersion;
|
||||
}
|
||||
|
||||
if (iscloud === true || iscloud === false) {
|
||||
void setCommandContext(ContextKeys.ISCLOUD, iscloud);
|
||||
if (isCloud === true || isCloud === false) {
|
||||
void setCommandContext(ContextKeys.ISCLOUD, isCloud);
|
||||
}
|
||||
|
||||
if (!types.isUndefinedOrNull(edition)) {
|
||||
|
||||
Reference in New Issue
Block a user