minified does not work in the emulator or iOS so move settings iteration to utils.prepareSettingsForAppMessage()

This commit is contained in:
Keegan
2016-03-09 12:24:29 +11:00
parent 34d83de59e
commit 37c64a6e05
4 changed files with 45 additions and 50 deletions
+2 -8
View File
@@ -4,7 +4,7 @@ var configPageHtml = require('./tmp/config-page.html');
var toSource = require('tosource');
var standardComponents = require('./src/scripts/components');
var utils = require('./src/scripts/lib/utils');
var _ = require('./src/scripts/vendor/minified')._;
/**
* @param {Array} config - the Clay config
* @param {function} [customFn] - Custom code to run from the config page. Will run
@@ -165,13 +165,7 @@ Clay.prototype.getSettings = function(response, convert) {
localStorage.setItem('clay-settings', JSON.stringify(settings));
if (convert === false) {
return settings;
} else {
return _.mapObj(settings, function(key, value) {
return utils.prepareForAppMessage(value);
});
}
return convert === false ? settings : utils.prepareSettingsForAppMessage(settings);
};
/**