Update events.js

Same problem as [](https://github.com/NodeBB/NodeBB/pull/4069).  Added a **translator** variable refering to **translator** module instead of global *translator*.
This solves warnings editing posts with *composer*.
v1.18.x
Manuel Valle
parent fa136ca021
commit dbcb6f9796

@ -130,10 +130,12 @@ define('forum/topic/events', [
};
templates.parse('partials/topic/post-editor', editData, function(html) {
translator.translate(html, function(translated) {
html = $(translated);
editorEl.replaceWith(html);
html.find('.timeago').timeago();
require(['translator'], function(translator) {
translator.translate(html, function(translated) {
html = $(translated);
editorEl.replaceWith(html);
html.find('.timeago').timeago();
});
});
});

Loading…
Cancel
Save