firefox fixes
This commit is contained in:
parent
0a75e14d93
commit
44d7ad5a8b
@ -192,7 +192,7 @@ function dictionaryGroupsPopulate(options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for (const row of dictRowsSort(rows, options)) {
|
for (const row of dictRowsSort(rows, options)) {
|
||||||
const dictOptions = options.dictionaries[row.title];
|
const dictOptions = options.dictionaries[row.title] || {enabled: false, priority: 0};
|
||||||
const dictHtml = handlebarsRender('dictionary.html', {
|
const dictHtml = handlebarsRender('dictionary.html', {
|
||||||
title: row.title,
|
title: row.title,
|
||||||
version: row.version,
|
version: row.version,
|
||||||
|
@ -251,8 +251,8 @@ function dictEnabled(options) {
|
|||||||
|
|
||||||
function dictRowsSort(rows, options) {
|
function dictRowsSort(rows, options) {
|
||||||
return rows.sort((ra, rb) => {
|
return rows.sort((ra, rb) => {
|
||||||
const pa = options.dictionaries[ra.title].priority || 0;
|
const pa = (options.dictionaries[ra.title] || {}).priority || 0;
|
||||||
const pb = options.dictionaries[rb.title].priority || 0;
|
const pb = (options.dictionaries[rb.title] || {}).priority || 0;
|
||||||
if (pa > pb) {
|
if (pa > pb) {
|
||||||
return -1;
|
return -1;
|
||||||
} else if (pa < pb) {
|
} else if (pa < pb) {
|
||||||
|
Loading…
Reference in New Issue
Block a user