forked from wkh237/react-native-fetch-blob
-
Notifications
You must be signed in to change notification settings - Fork 793
Open
Description
Hello,
Thanks for your cool lib. I am really enjoing using it.
Found bug with session remove method. It doesn't remove item from list.
i
will be item (=path string) and not index of element. This code will never find item to delete, because list[i]
will always be undefined
.
rn-fetch-blob/class/RNFetchBlobSession.js
Line 48 in cf9e884
for(let i of list) { |
remove(path:string):RNFetchBlobSession {
let list = sessions[this.name]
for(let i of list) {
if(list[i] === path) {
sessions[this.name].splice(i, 1)
break;
}
}
return this
}
Suggest fix
remove(path:string):ReactNativeBlobUtilSession {
let list = sessions[this.name];
for (let i = 0; i < list.length; i++) {
if (list[i] === path) {
sessions[this.name].splice(i, 1);
break;
}
}
return this;
}
Metadata
Metadata
Assignees
Labels
No labels