actually use the name when saving

This commit is contained in:
tophf 2017-12-03 20:32:50 +03:00
parent 0f3ddb9c03
commit f4677a7b7b
2 changed files with 4 additions and 1 deletions

View File

@ -238,6 +238,9 @@ function getStyles(options) {
cachedStyles.byId.clear();
for (const style of cachedStyles.list) {
cachedStyles.byId.set(style.id, style);
if (!style.name) {
style.name = 'ID: ' + style.id;
}
}
cachedStyles.mutex.inProgress = false;

View File

@ -387,7 +387,7 @@ function save() {
saveStyleSafe({
id: styleId,
name: name,
name: $('#name').value.trim(),
enabled: $('#enabled').checked,
reason: 'editSave',
sections: getSectionsHashes()