Replace for..each loops with for..of
This commit is contained in:
parent
796a6e7337
commit
0e8f04c0f5
6 changed files with 19 additions and 19 deletions
|
@ -841,7 +841,7 @@ jala.db.RamDatabase.prototype.copyTables = function(database, tables) {
|
||||||
tables = jala.db.metadata.getTableNames(dbMetadata);
|
tables = jala.db.metadata.getTableNames(dbMetadata);
|
||||||
}
|
}
|
||||||
|
|
||||||
for each (var tableName in tables) {
|
for (let tableName of tables) {
|
||||||
// drop the table if it exists
|
// drop the table if it exists
|
||||||
if (this.tableExists(tableName)) {
|
if (this.tableExists(tableName)) {
|
||||||
this.dropTable(tableName);
|
this.dropTable(tableName);
|
||||||
|
|
|
@ -330,7 +330,7 @@ MessageParser.prototype.parseSkinFile = function(file, encoding) {
|
||||||
var processMacros = function(macros) {
|
var processMacros = function(macros) {
|
||||||
var re = gettext_macro.REGEX;
|
var re = gettext_macro.REGEX;
|
||||||
var id, pluralId, name, args, param, key, msg;
|
var id, pluralId, name, args, param, key, msg;
|
||||||
for each (var macro in macros) {
|
for (let macro of macros) {
|
||||||
id = pluralId = null;
|
id = pluralId = null;
|
||||||
name = macro.getName();
|
name = macro.getName();
|
||||||
param = macro.getNamedParams();
|
param = macro.getNamedParams();
|
||||||
|
@ -374,7 +374,7 @@ MessageParser.prototype.parseSkinFile = function(file, encoding) {
|
||||||
if (skin.hasMainskin()) {
|
if (skin.hasMainskin()) {
|
||||||
processMacros(skin.getMacros());
|
processMacros(skin.getMacros());
|
||||||
}
|
}
|
||||||
for each (var name in skin.getSubskinNames()) {
|
for (let name of skin.getSubskinNames()) {
|
||||||
var subskin = skin.getSubskin(name);
|
var subskin = skin.getSubskin(name);
|
||||||
processMacros(subskin.getMacros());
|
processMacros(subskin.getMacros());
|
||||||
}
|
}
|
||||||
|
|
|
@ -1336,7 +1336,7 @@ jala.Test.DatabaseMgr.prototype.startDatabase = function(dbSourceName, copyTable
|
||||||
// collect the table names of all relational prototypes
|
// collect the table names of all relational prototypes
|
||||||
tables = [];
|
tables = [];
|
||||||
var protos = app.getPrototypes();
|
var protos = app.getPrototypes();
|
||||||
for each (var proto in protos) {
|
for (let proto of protos) {
|
||||||
var dbMap = proto.getDbMapping();
|
var dbMap = proto.getDbMapping();
|
||||||
if (dbMap.isRelational()) {
|
if (dbMap.isRelational()) {
|
||||||
tables.push(dbMap.getTableName());
|
tables.push(dbMap.getTableName());
|
||||||
|
|
|
@ -149,7 +149,7 @@ function testOrder(org, pos) {
|
||||||
|
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
var persons = root.persons.list();
|
var persons = root.persons.list();
|
||||||
for each (var person in persons) {
|
for (let person of persons) {
|
||||||
person.remove();
|
person.remove();
|
||||||
}
|
}
|
||||||
ikea.remove();
|
ikea.remove();
|
||||||
|
|
2
src/dist/apps/test/tests/HopObjectGeneric.js
vendored
2
src/dist/apps/test/tests/HopObjectGeneric.js
vendored
|
@ -86,7 +86,7 @@ function testAdd() {
|
||||||
|
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
var persons = org.generic.list();
|
var persons = org.generic.list();
|
||||||
for each (var person in persons) {
|
for (let person of persons) {
|
||||||
person.remove();
|
person.remove();
|
||||||
}
|
}
|
||||||
org.remove();
|
org.remove();
|
||||||
|
|
2
src/dist/apps/test/tests/HopObjectGroupBy.js
vendored
2
src/dist/apps/test/tests/HopObjectGroupBy.js
vendored
|
@ -143,7 +143,7 @@ function testGroupTransient() {
|
||||||
|
|
||||||
function cleanup() {
|
function cleanup() {
|
||||||
var orgs = root.organisations.list();
|
var orgs = root.organisations.list();
|
||||||
for each (var org in orgs) {
|
for (let org of orgs) {
|
||||||
org.remove();
|
org.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Add table
Reference in a new issue