Modernise forEach loops throughout
This commit is contained in:
@@ -32,13 +32,13 @@ export class ScriptDialogMessage implements MessageBase
|
||||
return (this.Data['FirstName'].length + 1 + this.Data['LastName'].length + 1 + this.Data['ObjectName'].length + 1 + this.Data['Message'].length + 2) + this.calculateVarVarSize(this.Buttons, 'ButtonLabel', 1) + ((16) * this.OwnerData.length) + 38;
|
||||
}
|
||||
|
||||
calculateVarVarSize(block: object[], paramName: string, extraPerVar: number): number
|
||||
calculateVarVarSize(block: {[key: string]: any}[], paramName: string, extraPerVar: number): number
|
||||
{
|
||||
let size = 0;
|
||||
block.forEach((bl: any) =>
|
||||
for (const bl of block)
|
||||
{
|
||||
size += bl[paramName].length + extraPerVar;
|
||||
});
|
||||
}
|
||||
return size;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user