mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-17 02:51:36 -05:00
fixed more null references (#4841)
This commit is contained in:
@@ -37,7 +37,7 @@ export class HeightMap {
|
|||||||
let totalSize: number;
|
let totalSize: number;
|
||||||
let sizeDiff = 0;
|
let sizeDiff = 0;
|
||||||
|
|
||||||
if (afterItemId === null) {
|
if (afterItemId === undefined) {
|
||||||
i = 0;
|
i = 0;
|
||||||
totalSize = 0;
|
totalSize = 0;
|
||||||
} else {
|
} else {
|
||||||
@@ -201,12 +201,12 @@ export class HeightMap {
|
|||||||
return this.heightMap[index];
|
return this.heightMap[index];
|
||||||
}
|
}
|
||||||
|
|
||||||
public itemAfter(item: IViewItem): IViewItem {
|
public itemAfter(item: IViewItem): IViewItem | undefined {
|
||||||
return this.heightMap[this.indexes[item.view.id] + 1] || null;
|
return this.heightMap[this.indexes[item.view.id] + 1] || undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
public dispose(): void {
|
public dispose(): void {
|
||||||
this.heightMap = null;
|
this.heightMap = undefined;
|
||||||
this.indexes = null;
|
this.indexes = undefined;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user