Fixed tiny bug to prevent returning "undefined" values
This commit is contained in:
parent
86145cd8f7
commit
bbf33a214b
1 changed files with 8 additions and 1 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue