auto save default value to options when options does not contain this key

This commit is contained in:
MaysWind 2016-05-16 21:32:15 +08:00
parent 671124e3da
commit c25e790ecd

View file

@ -18,7 +18,14 @@
};
var getOption = function (key) {
return getOptions()[key];
var options = getOptions();
if (angular.isUndefined(options[key])) {
options[key] = ariaNgDefaultOptions[key];
setOptions(options);
}
return options[key];
};
var setOption = function (key, value) {