mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-11 10:38:31 -05:00
Strict Null Checks, Builder Removal, Formatting (#4849)
* remove builder; more null checks * null checks * formatting * wip * fix dropdown themeing * formatting * formatting * fix tests * update what files are checked * add code to help refresh bad nodes
This commit is contained in:
@@ -622,8 +622,12 @@ export class ContextKeyGreaterThanEqualsExpr implements ContextKeyExpr {
|
||||
}
|
||||
|
||||
public evaluate(context: IContext): boolean {
|
||||
let keyInt = parseFloat(context.getValue(this.key));
|
||||
let valueInt = parseFloat(this.value);
|
||||
const keyVal = context.getValue<string>(this.key);
|
||||
if (!keyVal) {
|
||||
return false;
|
||||
}
|
||||
const keyInt = parseFloat(keyVal);
|
||||
const valueInt = parseFloat(this.value);
|
||||
return (keyInt >= valueInt);
|
||||
}
|
||||
|
||||
@@ -677,8 +681,12 @@ export class ContextKeyLessThanEqualsExpr implements ContextKeyExpr {
|
||||
}
|
||||
|
||||
public evaluate(context: IContext): boolean {
|
||||
let keyInt = parseFloat(context.getValue(this.key));
|
||||
let valueInt = parseFloat(this.value);
|
||||
const keyVal = context.getValue<string>(this.key);
|
||||
if (!keyVal) {
|
||||
return false;
|
||||
}
|
||||
const keyInt = parseFloat(keyVal);
|
||||
const valueInt = parseFloat(this.value);
|
||||
return (keyInt <= valueInt);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user