Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Require cycle refactor fix #709

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions polyfill/Blob.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,16 @@
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.

import RNFetchBlob from '../index.js'
// import RNFetchBlob from '../index.js'
import {NativeModules} from 'react-native';
import fs from '../fs.js'
import getUUID from '../utils/uuid'
import Log from '../utils/log.js'
import EventTarget from './EventTarget'

const log = new Log('Blob')
const blobCacheDir = fs.dirs.DocumentDir + '/RNFetchBlob-blobs/'
const RNFetchBlob = NativeModules.RNFetchBlob

log.disable()
// log.level(3)
Expand Down Expand Up @@ -291,7 +293,7 @@ export default class Blob extends EventTarget {
if(!this._isReference) {
return fs.unlink(this._ref).catch((err) => {
console.warn(err)
})
})
}
else {
return Promise.resolve()
Expand Down
4 changes: 2 additions & 2 deletions polyfill/Fetch.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import RNFetchBlob from '../index.js'
import Log from '../utils/log.js'
import fs from '../fs'
import unicode from '../utils/unicode'
import Blob from './Blob'

import {NativeModules} from 'react-native';
const RNFetchBlob = NativeModules.RNFetchBlob
const log = new Log('FetchPolyfill')

log.disable()
Expand Down
3 changes: 2 additions & 1 deletion polyfill/XMLHttpRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@
// Use of this source code is governed by a MIT-style license that can be
// found in the LICENSE file.

import RNFetchBlob from '../index.js'
import XMLHttpRequestEventTarget from './XMLHttpRequestEventTarget.js'
import Log from '../utils/log.js'
import Blob from './Blob.js'
import ProgressEvent from './ProgressEvent.js'
import URIUtil from '../utils/uri'
import {NativeModules} from 'react-native';

const RNFetchBlob = NativeModules.RNFetchBlob
const log = new Log('XMLHttpRequest')

log.disable()
Expand Down