Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

people: Do not return undefined for is_cross_realm_email.

Zixuan James Licd97c497bc0e
diff --git a/web/src/people.js b/web/src/people.js
index fe977ed4918..24da8bb5df1 100644
--- a/web/src/people.js
+++ b/web/src/people.js
@@ -943,7 +943,7 @@ export function get_non_active_realm_users() {
export function is_cross_realm_email(email) {
const person = get_by_email(email);
if (!person) {
- return undefined;
+ return false;
}
return cross_realm_dict.has(person.user_id);
}
diff --git a/web/tests/people.test.js b/web/tests/people.test.js
index 020b4ea4dc8..336783318f1 100644
--- a/web/tests/people.test.js
+++ b/web/tests/people.test.js
@@ -352,7 +352,7 @@ test_people("basics", () => {
assert.equal(person.full_name, "Me Myself");
// Test undefined people
- assert.equal(people.is_cross_realm_email("[email protected]"), undefined);
+ assert.equal(people.is_cross_realm_email("[email protected]"), false);
// Test is_my_user_id function
assert.equal(people.is_my_user_id(me.user_id), true);