Handle styles without sections
This commit is contained in:
parent
00664cc90c
commit
9b47b57327
|
@ -104,15 +104,17 @@ 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: []};
|
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);
|
cachedStyles.push(currentStyle);
|
||||||
}
|
}
|
||||||
if (currentSection == null || currentSection.id != values.section_id) {
|
if (values.section_id != null) {
|
||||||
currentSection = {id: values.section_id, code: values.code};
|
if (currentSection == null || currentSection.id != values.section_id) {
|
||||||
currentStyle.sections.push(currentSection);
|
currentSection = {id: values.section_id, code: values.code};
|
||||||
}
|
currentStyle.sections.push(currentSection);
|
||||||
if (metaName && metaValue) {
|
}
|
||||||
if (currentSection[metaName]) {
|
if (metaName && metaValue) {
|
||||||
currentSection[metaName].push(metaValue);
|
if (currentSection[metaName]) {
|
||||||
} else {
|
currentSection[metaName].push(metaValue);
|
||||||
currentSection[metaName] = [metaValue];
|
} else {
|
||||||
|
currentSection[metaName] = [metaValue];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user