mirror of
https://github.com/ether/etherpad-lite.git
synced 2026-05-08 21:56:12 +02:00
pad_editbar: Move dropdowns initialization to constructor
This avoids null dereference if a buggy caller calls
`toggleDropDown('none')` before `init()`. (Ideally the caller would be
fixed, but this is not always feasible.)
This commit is contained in:
parent
42b0b1bf00
commit
fda34407f9
@ -124,10 +124,9 @@ const syncAnimation = (() => {
|
||||
|
||||
exports.padeditbar = {
|
||||
_editbarPosition: 0,
|
||||
dropdowns: [],
|
||||
|
||||
init() {
|
||||
this.dropdowns = [];
|
||||
|
||||
$('#editbar .editbarbutton').attr('unselectable', 'on'); // for IE
|
||||
this.enable();
|
||||
$('#editbar [data-key]').each((i, elt) => {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user