Skip to content

Commit

Permalink
refactor: stop injecting window.Buffer
Browse files Browse the repository at this point in the history
Closes #637
  • Loading branch information
lidel committed Apr 5, 2020
1 parent 0fcc2d2 commit d6511cb
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
4 changes: 0 additions & 4 deletions add-on/src/contentScripts/ipfs-proxy/page.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
'use strict'

const _Buffer = Buffer
const { assign, freeze } = Object

// TODO: (wip) this should not be injected by default into every page,
Expand Down Expand Up @@ -46,7 +45,4 @@ function createWindowIpfs () {
return freeze(proxyClient)
}

// TODO: we should remove Buffer and add support for Uint8Array/ArrayBuffer natively
// See: https://github.com/ipfs/interface-ipfs-core/issues/404
window.Buffer = window.Buffer || _Buffer
window.ipfs = window.ipfs || createWindowIpfs()
2 changes: 0 additions & 2 deletions docs/window.ipfs.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,6 @@ if (window.ipfs && window.ipfs.enable) {
}
```

Note that IPFS Companion also adds `window.Buffer` if it doesn't already exist.

See also: [How do I fallback if `window.ipfs` is not available?](#how-do-i-fallback-if-windowipfs-is-not-available)

### Error Codes
Expand Down

0 comments on commit d6511cb

Please sign in to comment.