mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-14 17:56:16 +01:00
remove setTimeout hax in settingsv1 :squirrel:
This commit is contained in:
@@ -5,18 +5,10 @@ define('admin/settings', ['uploader', 'sounds'], function(uploader, sounds) {
|
||||
var Settings = {};
|
||||
|
||||
Settings.init = function() {
|
||||
Settings.prepare();
|
||||
$(window).on('action:config.loaded', Settings.prepare);
|
||||
};
|
||||
|
||||
Settings.prepare = function(callback) {
|
||||
// Come back in 125ms if the config isn't ready yet
|
||||
if (!app.config) {
|
||||
setTimeout(function() {
|
||||
Settings.prepare(callback);
|
||||
}, 125);
|
||||
return;
|
||||
}
|
||||
|
||||
// Populate the fields on the page from the config
|
||||
var fields = $('#content [data-field]'),
|
||||
numFields = fields.length,
|
||||
|
||||
Reference in New Issue
Block a user