Improve LRUCache containsKey test, thanks @tschaub

This commit is contained in:
Tom Payne
2013-02-07 12:20:53 +01:00
parent f7ba03f4dd
commit 218bf2c78b
2 changed files with 30 additions and 3 deletions

View File

@@ -91,7 +91,7 @@ ol.structs.LRUCache.prototype.clear = function() {
* @return {boolean} Contains key.
*/
ol.structs.LRUCache.prototype.containsKey = function(key) {
return key in this.entries_;
return this.entries_.hasOwnProperty(key);
};