Skip to content

Commit 2d2201d

Browse files
committed
fix: missing () on constructor
1 parent 9eb3482 commit 2d2201d

File tree

1 file changed

+2
-2
lines changed
  • src/tutorials/0005-regular-files-api

1 file changed

+2
-2
lines changed

src/tutorials/0005-regular-files-api/07.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const validate = async (result, ipfs) => {
3737
}
3838

3939
if (result instanceof Uint8Array) {
40-
let isEqual = (new TextEncoder()).encode('You did it!').every((elem, idx) => {
40+
let isEqual = new TextEncoder().encode('You did it!').every((elem, idx) => {
4141
return elem === result[idx]
4242
})
4343
if (isEqual) {
@@ -83,7 +83,7 @@ const run = async () => {
8383
// Using the dir subdirectory CID and file path relative to it:
8484
// const bufferedContents = await toBuffer(ipfs.cat("/ipfs/QmPT14mWCteuybfrfvqas2L2oin1Y2NCbwzTh9cc33GM1r/success.txt"))
8585
86-
return new TextDecoder.decode(bufferedContents)
86+
return new TextDecoder().decode(bufferedContents)
8787
}
8888
return run
8989
`

0 commit comments

Comments
 (0)