mercredi 2 avril 2014

Method getInitialConfig of Ext.Base is wrong?

The method getInitialConfig of Ext.Base is :

/**

* Returns the initial configuration passed to constructor when instantiating

* this class.

* @param {String} [name] Name of the config option to return.

* @return {Object/Mixed} The full config object or a single config value

* when `name` parameter specified.

*/

getInitialConfig: function(name) {

var config = this.config;





if (!name) {

return config;

}

else {

return config[name];

}

},



The result of this method return is wrong. I thank the following is correct:



getInitialConfig: function(name) {

var config = this.initialConfig;





if (!name) {

return config;

}

else {

return config[name];

}

},




Aucun commentaire:

Enregistrer un commentaire