Fix reskindex

This commit is contained in:
David Baker 2015-09-17 18:21:35 +01:00
parent d938ba70d3
commit 6eb18f0268

View file

@ -82,7 +82,7 @@ for (var i = 0; i < files.length; ++i) {
// create objects for submodules // create objects for submodules
// NB. that we do not support creating additional // NB. that we do not support creating additional
// top level modules. Perhaps we should? // top level modules. Perhaps we should?
var subtree = tree; var subtree = tree[module.split('.')[0]];
var restOfPath = module.split('.').slice(0, -1); var restOfPath = module.split('.').slice(0, -1);
var currentPath = restOfPath[0]; var currentPath = restOfPath[0];
restOfPath = restOfPath.slice(1); restOfPath = restOfPath.slice(1);
@ -91,8 +91,9 @@ for (var i = 0; i < files.length; ++i) {
if (subtree[restOfPath[0]] == undefined) { if (subtree[restOfPath[0]] == undefined) {
strm.write('skin.'+currentPath+' = {};\n'); strm.write('skin.'+currentPath+' = {};\n');
strm.uncork(); strm.uncork();
subtree[restOfPath[0]] = {};
} }
subtree[restOfPath[0]] = {}; subtree = subtree[restOfPath[0]];
restOfPath = restOfPath.slice(1); restOfPath = restOfPath.slice(1);
} }