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,12 +130,14 @@ define('forum/topic/events', [
};
templates.parse('partials/topic/post-editor', editData, function(html) {
require(['translator'], function(translator) {
translator.translate(html, function(translated) {
html = $(translated);
editorEl.replaceWith(html);
html.find('.timeago').timeago();
});
});
});
if (data.topic.tags && tagsUpdated(data.topic.tags)) {
templates.parse('partials/post_bar', 'tags', {tags: data.topic.tags}, function(html) {

Loading…
Cancel
Save