mirror of
https://github.com/pebble-dev/clay.git
synced 2026-08-28 12:56:34 -04:00
Change the behavior so that type conversions only run inside of Clay.getSettings no ClayConfig.getSettings
This commit is contained in:
@@ -158,7 +158,7 @@ function ClayConfig(settings, config, $rootContainer, meta) {
|
||||
self.getSettings = function() {
|
||||
_checkBuilt('getSettings');
|
||||
_.eachObj(_itemsByAppKey, function(appKey, item) {
|
||||
_settings[appKey] = utils.prepareForAppMessage(item.get());
|
||||
_settings[appKey] = item.get();
|
||||
});
|
||||
return _settings;
|
||||
};
|
||||
|
||||
Vendored
+42
-2
@@ -1,8 +1,8 @@
|
||||
// minified.js config start -- use this comment to re-create a configuration in the Builder
|
||||
// - Only sections add, always, amdsupport, copyobj, dollardollar,
|
||||
// - each, eachobj, equals, error, extend, find, format, formathtml, get, ht,
|
||||
// - html, isobject, off, on, ready, request, select, set, template, trigger,
|
||||
// - underscore, wait.
|
||||
// - html, isobject, mapobj, off, on, ready, request, select, set, template,
|
||||
// - trigger, underscore, wait.
|
||||
|
||||
|
||||
// WARNING! This file is autogenerated from minified-master.js and others.
|
||||
@@ -2774,6 +2774,46 @@ define('minified', function() {
|
||||
*/
|
||||
'eachObj': eachObj,
|
||||
|
||||
/*$
|
||||
* @id mapobj
|
||||
* @group OBJECT
|
||||
* @requires
|
||||
* @configurable default
|
||||
* @name _.mapObj()
|
||||
* @syntax _.mapObj(obj, callback)
|
||||
* @syntax _.mapObj(obj, callback, ctx)
|
||||
* @module UTIL
|
||||
* Creates a new object with the same properties but different values using the given callback function. The function is called
|
||||
* for each property of the input object to provice a new value for the property.
|
||||
*
|
||||
* @example Increases the values of all properties.
|
||||
* <pre>
|
||||
* var r = _.mapObj({a: 1, b: 5, c: 2}, function(key, value) {
|
||||
* return value + 1;
|
||||
* });
|
||||
* // r is now {a: 2, b: 6, c: 2}
|
||||
* </pre>
|
||||
*
|
||||
* @param obj the object to use
|
||||
* @param callback The callback <code>function(key, value)</code> to invoke for each property.
|
||||
* <dl><dt>key</dt><dd>The name of the current property.</dd>
|
||||
* <dt>value</dt><dd>The value of the current property.</dd>
|
||||
* <dt class="this">this</dt><dd>The given context. If not set, the object itself.</dd>
|
||||
* <dt class="returnValue">(callback return value)</dt><dd>This value will replace the original value in the new object.</dd></dl>
|
||||
* @param ctx optional a context to pass to the callback as 'this'.
|
||||
* @return the new object
|
||||
*
|
||||
* @see ##_.filterObj() filters an object.
|
||||
* @see ##map() maps a list.
|
||||
*/
|
||||
'mapObj': function(obj, mapFunc, ctx) {
|
||||
var result = {};
|
||||
eachObj(obj, function(key, value) {
|
||||
result[key] = mapFunc.call(ctx || obj, key, value);
|
||||
});
|
||||
return result;
|
||||
},
|
||||
|
||||
/*$
|
||||
* @id isobject
|
||||
* @group TYPE
|
||||
|
||||
Reference in New Issue
Block a user