mirror of
https://github.com/zoriya/react-native-background-downloader.git
synced 2025-12-06 06:56:10 +00:00
fix by eslint rules
This commit is contained in:
2
index.js
2
index.js
@@ -85,7 +85,7 @@ export function download (options) {
|
|||||||
: JSON.stringify({})
|
: JSON.stringify({})
|
||||||
|
|
||||||
RNBackgroundDownloader.download(options)
|
RNBackgroundDownloader.download(options)
|
||||||
const task = new DownloadTask({ id: options.id, metadata: options.metadata})
|
const task = new DownloadTask({ id: options.id, metadata: options.metadata })
|
||||||
tasksMap.set(options.id, task)
|
tasksMap.set(options.id, task)
|
||||||
return task
|
return task
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -18,9 +18,8 @@ export default class DownloadTask {
|
|||||||
this.bytesWritten = taskInfo.bytesWritten ?? 0
|
this.bytesWritten = taskInfo.bytesWritten ?? 0
|
||||||
this.totalBytes = taskInfo.totalBytes ?? 0
|
this.totalBytes = taskInfo.totalBytes ?? 0
|
||||||
|
|
||||||
if (this.#parseable(taskInfo.metadata)) {
|
if (this.#parseable(taskInfo.metadata))
|
||||||
this.metadata = JSON.parse(taskInfo.metadata)
|
this.metadata = JSON.parse(taskInfo.metadata)
|
||||||
}
|
|
||||||
|
|
||||||
if (originalTask) {
|
if (originalTask) {
|
||||||
this._beginHandler = originalTask._beginHandler
|
this._beginHandler = originalTask._beginHandler
|
||||||
|
|||||||
@@ -14,4 +14,4 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
};
|
}
|
||||||
|
|||||||
@@ -2,11 +2,11 @@ module.exports = {
|
|||||||
dependency: {
|
dependency: {
|
||||||
platforms: {
|
platforms: {
|
||||||
ios: {
|
ios: {
|
||||||
project: "./ios/RNBackgroundDownloader.xcodeproj"
|
project: './ios/RNBackgroundDownloader.xcodeproj',
|
||||||
},
|
},
|
||||||
android: {
|
android: {
|
||||||
sourceDir: "./android"
|
sourceDir: './android',
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
};
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user