Skip to content

Commit 98cc688

Browse files
authored
Merge pull request #984 from appwrite/fix-139-invalid-url
[CLI] Use `||` instead of `??` because `getEndpoint()` can return ""
2 parents 2dd681f + ff27108 commit 98cc688

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

templates/cli/lib/commands/generic.js.twig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ const DEFAULT_ENDPOINT = 'https://cloud.appwrite.io/v1';
1414
const loginCommand = async ({ email, password, endpoint, mfa, code }) => {
1515
const oldCurrent = globalConfig.getCurrentSession();
1616

17-
const configEndpoint = endpoint ?? globalConfig.getEndpoint() ?? DEFAULT_ENDPOINT;
17+
const configEndpoint = (endpoint ?? globalConfig.getEndpoint()) || DEFAULT_ENDPOINT;
1818

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

0 commit comments

Comments
 (0)