Make sure namespaces are populated after they were created

This commit is contained in:
Andreas Hocevar
2018-03-09 15:48:31 +01:00
parent 77dd0c0842
commit a964dd27e9

View File

@@ -103,7 +103,7 @@ function generateExports(symbols, namespaces, imports) {
nsdefs.push(`${ns[i]} = {};`);
}
}
blocks = imports.concat(nsdefs).concat(blocks);
blocks = imports.concat(nsdefs.sort()).concat(blocks.sort());
blocks.push('');
return blocks.join('\n');
}