Don't initialize bot_data until after people.initialize()

bot_data initialization depends on the results of people.initialize(); for
example, to determine whether a bot is owned by the current user.
This commit is contained in:
Elliott Jin
2017-05-24 17:50:50 -07:00
committed by showell
parent 6518c63b14
commit 573e06260a
2 changed files with 3 additions and 2 deletions

View File

@@ -55,11 +55,11 @@ var bot_data = (function () {
return bots[email];
};
$(function init() {
exports.initialize = function () {
_.each(page_params.realm_bots, function (bot) {
exports.add(bot);
});
});
};
return exports;
}());

View File

@@ -242,6 +242,7 @@ $(function () {
// initialize other stuff
reload.initialize();
people.initialize();
bot_data.initialize(); // Must happen after people.initialize()
markdown.initialize();
composebox_typeahead.initialize();
search.initialize();