Skip to content

Commit

Permalink
Merge pull request #984 from appwrite/fix-139-invalid-url
Browse files Browse the repository at this point in the history
[CLI] Use `||` instead of `??` because `getEndpoint()` can return ""
stnguyen90 authored Sep 19, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
2 parents 2dd681f + ff27108 commit 98cc688
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion templates/cli/lib/commands/generic.js.twig
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ const DEFAULT_ENDPOINT = 'https://cloud.appwrite.io/v1';
const loginCommand = async ({ email, password, endpoint, mfa, code }) => {
const oldCurrent = globalConfig.getCurrentSession();

const configEndpoint = endpoint ?? globalConfig.getEndpoint() ?? DEFAULT_ENDPOINT;
const configEndpoint = (endpoint ?? globalConfig.getEndpoint()) || DEFAULT_ENDPOINT;

if (globalConfig.getCurrentSession() !== '') {
log('You are currently signed in as ' + globalConfig.getEmail());

0 comments on commit 98cc688

Please sign in to comment.