fixed issue caused by using same name for defaults and overrides

This commit is contained in:
Jonathan Stewmon 2011-12-19 16:37:16 -06:00 committed by indexzero
parent e0e070ab28
commit 2804b1fb37

View file

@ -41,7 +41,11 @@ var Provider = exports.Provider = function (options) {
//
['defaults', 'overrides'].forEach(function (type) {
Provider.prototype[type] = function (options) {
return this.add('literal', options);
options = options || {};
if(!options.type) {
options.type = 'literal';
}
return this.add(type, options);
};
});