Fixed tiny bug to prevent returning "undefined" values

This commit is contained in:
Tobi Schäfer 2008-05-12 14:18:50 +00:00
parent 86145cd8f7
commit bbf33a214b

View file

@ -76,7 +76,14 @@ Metadata.prototype.get = function(key) {
if (this.cache.data == null) {
this.cache.data = this.load() || {};
}
return (arguments.length > 0) ? this.cache.data[key] : this.cache.data;
if (arguments.length < 1) {
return this.cache.data;
}
var value = this.cache.data[key];
if (value !== undefined) {
return value;
}
return null;
}
/**