mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-01-06 23:52:58 +01:00
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*.
This commit is contained in:
@@ -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();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user