Skip to content

Commit 0a54125

Browse files
committed
fix: dropbox
1 parent ccb8b65 commit 0a54125

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

lib/dropbox.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ const tryToCatch = require('try-to-catch');
44
const {Dropbox: _Dropbox} = require('dropbox');
55
const dropboxStream = require('dropbox-stream');
66
const dropboxify = require('dropboxify');
7+
const {defineProperty} = Object;
78
const isString = (a) => typeof a === 'string';
89

910
const _fetch = fetch;
@@ -25,13 +26,12 @@ const ewrap = (promise) => async (...args) => {
2526
};
2627

2728
const customFetch = async (url, options) => {
28-
const response = await fetch(input, init);
29-
30-
return defineProperty(response, "buffer", {
31-
value: response.arrayBuffer,
29+
const response = await fetch(url, options);
30+
31+
return defineProperty(response, 'buffer', {
32+
value: response.arrayBuffer,
3233
});
33-
};
34-
34+
};
3535

3636
module.exports.readFile = ewrap(async (token, path, {fetch = _fetch, Dropbox = _Dropbox} = {}) => {
3737
checkToken(token);

0 commit comments

Comments
 (0)