firefox fixes

This commit is contained in:
Alex Yatskov 2017-03-05 16:27:29 -08:00
parent 0a75e14d93
commit 44d7ad5a8b
2 changed files with 3 additions and 3 deletions

View File

@ -192,7 +192,7 @@ function dictionaryGroupsPopulate(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', {
title: row.title,
version: row.version,

View File

@ -251,8 +251,8 @@ function dictEnabled(options) {
function dictRowsSort(rows, options) {
return rows.sort((ra, rb) => {
const pa = options.dictionaries[ra.title].priority || 0;
const pb = options.dictionaries[rb.title].priority || 0;
const pa = (options.dictionaries[ra.title] || {}).priority || 0;
const pb = (options.dictionaries[rb.title] || {}).priority || 0;
if (pa > pb) {
return -1;
} else if (pa < pb) {