mirror of
https://github.com/minio/minio.git
synced 2025-01-12 07:23:23 -05:00
Check bucket & prefix after obj's for new bucket are fetched (#7838)
Fixes #7837
This commit is contained in:
parent
d3f9f8be88
commit
36c19f1d65
@ -77,6 +77,12 @@ export const fetchObjects = () => {
|
|||||||
prefix: currentPrefix
|
prefix: currentPrefix
|
||||||
})
|
})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
|
// we need to check if the bucket name and prefix are the same as
|
||||||
|
// when the request was made before updating the displayed objects
|
||||||
|
if (
|
||||||
|
currentBucket === getCurrentBucket(getState()) &&
|
||||||
|
currentPrefix === getCurrentPrefix(getState())
|
||||||
|
) {
|
||||||
let objects = []
|
let objects = []
|
||||||
if (res.objects) {
|
if (res.objects) {
|
||||||
objects = res.objects.map(object => {
|
objects = res.objects.map(object => {
|
||||||
@ -96,6 +102,7 @@ export const fetchObjects = () => {
|
|||||||
|
|
||||||
dispatch(setPrefixWritable(res.writable))
|
dispatch(setPrefixWritable(res.writable))
|
||||||
dispatch(setListLoading(false))
|
dispatch(setListLoading(false))
|
||||||
|
}
|
||||||
})
|
})
|
||||||
.catch(err => {
|
.catch(err => {
|
||||||
if (web.LoggedIn()) {
|
if (web.LoggedIn()) {
|
||||||
|
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user