Fixed Cache Store.Memory usage of Object#reduce()
Esse commit está contido em:
@@ -126,12 +126,13 @@ exports.Store.Memory = exports.Store.extend({
|
||||
return callback(this.data[key] instanceof Cache
|
||||
? this.data[key].val
|
||||
: null)
|
||||
var regexp = this.normalize(key)
|
||||
callback(this.data.reduce(function(vals, cache){
|
||||
if (regexp.test(cache.key))
|
||||
vals[cache.key] = cache.val
|
||||
return vals
|
||||
}, {}))
|
||||
var regexp = this.normalize(key),
|
||||
keys = Object.keys(this.data),
|
||||
matches = {}
|
||||
for (var i = 0, len = keys.length; i < len; ++i)
|
||||
if (regexp.test(keys[i]))
|
||||
matches[keys[i]] = this.data[keys[i]]
|
||||
return matches
|
||||
},
|
||||
|
||||
/**
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário