Skip to content
This repository has been archived by the owner on Aug 11, 2021. It is now read-only.

Commit

Permalink
fix: actually use object keys
Browse files Browse the repository at this point in the history
The code was wrong, it didn't actually use the keys of the object.
This also broke things in Browser environments.

Fixes ipfs/js-ipfs#2090.
  • Loading branch information
vmx committed May 22, 2019
1 parent d02c659 commit a411eeb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/dag-node/addNamedLink.js
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit a411eeb

Please sign in to comment.