fix: convert some hooks to use hooks module

re: julianlam/nodebb-plugin-markdown#130
This commit is contained in:
Julian Lam
2021-06-25 16:52:46 -04:00
parent a76eab1ca2
commit 09bac6bd7e
5 changed files with 16 additions and 10 deletions

View File

@@ -1,7 +1,7 @@
'use strict';
define('forum/categories', ['components', 'categorySelector'], function (components, categorySelector) {
define('forum/categories', ['components', 'categorySelector', 'hooks'], function (components, categorySelector, hooks) {
var categories = {};
$(window).on('action:ajaxify.start', function (ev, data) {
@@ -63,7 +63,7 @@ define('forum/categories', ['components', 'categorySelector'], function (compone
recentPosts.last().remove();
}
$(window).trigger('action:posts.loaded', { posts: [post] });
hooks.fire('action:posts.loaded', { posts: [post] });
});
}