Commit 23a4a20d authored by JC Brand's avatar JC Brand

Bugfixes

Mesage versions modal didn't open on subsequent clicks
Autocomplete: avoid undefined error
parent bb3f52d2
...@@ -280,10 +280,7 @@ export default class Message extends CustomElement { ...@@ -280,10 +280,7 @@ export default class Message extends CustomElement {
showMessageVersionsModal (ev) { showMessageVersionsModal (ev) {
ev.preventDefault(); ev.preventDefault();
if (this.message_versions_modal === undefined) { api.modal.show(MessageVersionsModal, {'model': this.model}, ev);
this.message_versions_modal = new MessageVersionsModal({'model': this.model});
}
this.message_versions_modal.show(ev);
} }
toggleSpoilerMessage (ev) { toggleSpoilerMessage (ev) {
......
...@@ -17,6 +17,7 @@ const u = converse.env.utils; ...@@ -17,6 +17,7 @@ const u = converse.env.utils;
export class AutoComplete { export class AutoComplete {
constructor (el, config={}) { constructor (el, config={}) {
this.suggestions = [];
this.is_opened = false; this.is_opened = false;
if (u.hasClass('suggestion-box', el)) { if (u.hasClass('suggestion-box', el)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment