From a411eeb45f09df66af2478d775a70fca45d6b14d Mon Sep 17 00:00:00 2001 From: Volker Mische Date: Wed, 22 May 2019 15:35:07 +0200 Subject: [PATCH] fix: actually use object keys The code was wrong, it didn't actually use the keys of the object. This also broke things in Browser environments. Fixes https://github.com/ipfs/js-ipfs/issues/2090. --- src/dag-node/addNamedLink.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dag-node/addNamedLink.js b/src/dag-node/addNamedLink.js index 74fc689..decb53e 100644 --- a/src/dag-node/addNamedLink.js +++ b/src/dag-node/addNamedLink.js @@ -11,7 +11,7 @@ * @param {numner} position - The position within the array of links */ const addNamedLink = (object, name, position) => { - const skipNames = ['', ...Object.keys(this)] + const skipNames = ['', ...Object.keys(object)] if (skipNames.includes(name)) { return }