From 88d4c49d9a360be805f91d5e8e91c0b6ad91f1b9 Mon Sep 17 00:00:00 2001 From: Alex Liebowitz Date: Tue, 17 Jan 2017 05:11:21 -0500 Subject: [PATCH] Use Object.entries() when calling file info callbacks --- js/lbry.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/js/lbry.js b/js/lbry.js index c0c4798d7..628cd2bb4 100644 --- a/js/lbry.js +++ b/js/lbry.js @@ -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)) {