remove setTimeout hax in settingsv1 :squirrel:

This commit is contained in:
psychobunny
2015-07-20 17:16:30 -04:00
parent fdc66eb607
commit 0bc4799c3c
2 changed files with 2 additions and 10 deletions

View File

@@ -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,