Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit d6511cb

Browse files
committedApr 5, 2020
refactor: stop injecting window.Buffer
Closes #637
1 parent 0fcc2d2 commit d6511cb

File tree

2 files changed

+0
-6
lines changed

2 files changed

+0
-6
lines changed
 

‎add-on/src/contentScripts/ipfs-proxy/page.js

-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
'use strict'
22

3-
const _Buffer = Buffer
43
const { assign, freeze } = Object
54

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

49-
// TODO: we should remove Buffer and add support for Uint8Array/ArrayBuffer natively
50-
// See: https://github.com/ipfs/interface-ipfs-core/issues/404
51-
window.Buffer = window.Buffer || _Buffer
5248
window.ipfs = window.ipfs || createWindowIpfs()

‎docs/window.ipfs.md

-2
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,6 @@ if (window.ipfs && window.ipfs.enable) {
6868
}
6969
```
7070

71-
Note that IPFS Companion also adds `window.Buffer` if it doesn't already exist.
72-
7371
See also: [How do I fallback if `window.ipfs` is not available?](#how-do-i-fallback-if-windowipfs-is-not-available)
7472

7573
### Error Codes

0 commit comments

Comments
 (0)
Please sign in to comment.