Replace some var
s with const
and let
because `var` is evil
This commit is contained in:
parent
61ff5a5cc7
commit
797a9c1623
4
Code.ts
4
Code.ts
@ -36,8 +36,8 @@ function copyBody(
|
|||||||
dest: GoogleAppsScript.Document.Body,
|
dest: GoogleAppsScript.Document.Body,
|
||||||
index?: number
|
index?: number
|
||||||
) {
|
) {
|
||||||
var totalElements = source.getNumChildren();
|
const totalElements = source.getNumChildren();
|
||||||
for (var j = 0; j < totalElements; ++j) {
|
for (let j = 0; j < totalElements; ++j) {
|
||||||
if (index) copyElement(source.getChild(j), dest, index + j);
|
if (index) copyElement(source.getChild(j), dest, index + j);
|
||||||
else copyElement(source.getChild(j), dest);
|
else copyElement(source.getChild(j), dest);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user