Skip to content

Commit

Permalink
fix: map bucket name properly (#41)
Browse files Browse the repository at this point in the history
  • Loading branch information
chulanovskyi-bs authored Dec 24, 2024
1 parent 1e78361 commit c809581
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion shared/helpers/connectionHelper.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const connect = async ({ connectionInfo, app }) => {
const buckets = await clusterHelper.getAllBuckets({ cluster });
const selectedBucket = connectionInfo.couchbase_bucket;

if (selectedBucket && !buckets.includes(selectedBucket)) {
if (selectedBucket && !buckets?.map(bucket => bucket.name).includes(selectedBucket)) {
throw new Error(`Bucket ${selectedBucket} doesn't exist`);
}

Expand Down

0 comments on commit c809581

Please sign in to comment.