Skip to content

Commit

Permalink
select default option if none specified
Browse files Browse the repository at this point in the history
fixes #901
  • Loading branch information
jhchen committed Dec 8, 2016
1 parent 853c96f commit e353f99
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions modules/toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,7 @@ class Toolbar extends Module {
let [format, input] = pair;
if (input.tagName === 'SELECT') {
let option;
if (range == null) {
option = null;
} else if (formats[format] == null) {
if (range == null || formats[format] == null) {
option = input.querySelector('option[selected]');
} else if (!Array.isArray(formats[format])) {
let value = formats[format];
Expand Down

0 comments on commit e353f99

Please sign in to comment.