Handle styles without sections

This commit is contained in:
Jason Barnabe 2015-01-30 13:18:12 -06:00
parent 00664cc90c
commit 9b47b57327

View File

@ -104,6 +104,7 @@ function getStyles(options, callback) {
currentStyle = {id: values.id, url: values.url, updateUrl: values.updateUrl, md5Url: values.md5Url, name: values.name, enabled: values.enabled, originalMd5: values.originalMd5, sections: []};
cachedStyles.push(currentStyle);
}
if (values.section_id != null) {
if (currentSection == null || currentSection.id != values.section_id) {
currentSection = {id: values.section_id, code: values.code};
currentStyle.sections.push(currentSection);
@ -116,6 +117,7 @@ function getStyles(options, callback) {
}
}
}
}
callCallback();
}, reportError);
}, reportError);