Signed-off-by: Alex A. Naanou <alex.nanou@gmail.com>
This commit is contained in:
Alex A. Naanou 2014-11-30 22:30:10 +03:00
parent effc133750
commit 9d65ed62e9

View File

@ -1137,6 +1137,10 @@ actions.Actions(Client, {
/*********************************************************************/ /*********************************************************************/
// XXX this could install the handlers in two locations:
// - mixin if available...
// - base object (currently implemented)
// should the first be done?
var FeatureProto = var FeatureProto =
module.FeatureProto = { module.FeatureProto = {
tag: null, tag: null,
@ -1158,13 +1162,16 @@ module.FeatureProto = {
// merge config... // merge config...
// XXX should this use inheritance??? // XXX should this use inheritance???
if(this.config != null || (this.actions != null && this.actions.config != null)){ if(this.config != null
|| (this.actions != null
&& this.actions.config != null)){
var config = this.config || this.actions.config var config = this.config || this.actions.config
if(actions.config == null){ if(actions.config == null){
actions.config = {} actions.config = {}
} }
Object.keys(config).forEach(function(n){ Object.keys(config).forEach(function(n){
// keep existing keys...
if(actions.config[n] === undefined){ if(actions.config[n] === undefined){
actions.config[n] = config[n] actions.config[n] = config[n]
} }