Update events.js

Same problem as [#4069](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 9 years ago
parent fa136ca021
commit dbcb6f9796

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

Loading…
Cancel
Save