Fix error message on browser window resize when user has no buckets (#5275)

This commit handles the case where the list of buckets is empty on the
listObjects function of actions.js

Fixes #5267
This commit is contained in:
Kaan Kabalak 2017-12-06 15:52:23 -08:00 committed by Dee Koder
parent a1c1a18dc5
commit 67ac74471d
2 changed files with 45 additions and 42 deletions

View File

@ -316,8 +316,8 @@ export const selectBucket = (newCurrentBucket, prefix) => {
export const listObjects = () => {
return (dispatch, getState) => {
const {currentBucket, currentPath, marker, objects, istruncated, web} = getState()
if (!istruncated) return
const {buckets, currentBucket, currentPath, marker, objects, istruncated, web} = getState()
if (!istruncated || buckets.length === 0) return
web.ListObjects({
bucketName: currentBucket,
prefix: currentPath,

File diff suppressed because one or more lines are too long