Use Object.entries() when calling file info callbacks

This commit is contained in:
Alex Liebowitz 2017-01-17 05:11:21 -05:00
parent 0b9980f371
commit 88d4c49d9a

View file

@ -477,9 +477,9 @@ lbry._updateClaimOwnershipCache = function(claimId) {
lbry._updateSubscribedFileInfo = function(sdHash) {
const callSubscribedCallbacks = (sdHash, fileInfo) => {
Object.keys(this._fileInfoSubscribeCallbacks[sdHash]).forEach((subscribeId) => {
this._fileInfoSubscribeCallbacks[sdHash][subscribeId](fileInfo);
});
for (let [subscribeId, callback] of Object.entries(this._fileInfoSubscribeCallbacks[sdHash])) {
callback(fileInfo);
}
}
if (lbry._removedFiles.includes(sdHash)) {