Better variables scoping

This commit is contained in:
Frederic Junod
2018-01-17 16:07:36 +01:00
parent 4a6331377f
commit 039d4dc714
22 changed files with 74 additions and 134 deletions

View File

@@ -109,10 +109,9 @@ AtlasManager.prototype.getInfo = function(id) {
* or `null` if the entry is not part of the atlases.
*/
AtlasManager.prototype.getInfo_ = function(atlases, id) {
let atlas, info, i, ii;
for (i = 0, ii = atlases.length; i < ii; ++i) {
atlas = atlases[i];
info = atlas.get(id);
for (let i = 0, ii = atlases.length; i < ii; ++i) {
const atlas = atlases[i];
const info = atlas.get(id);
if (info) {
return info;
}