diff --git a/web/src/people.js b/web/src/people.js index fe977ed491..24da8bb5df 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 020b4ea4dc..336783318f 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("unknown@example.com"), undefined); + assert.equal(people.is_cross_realm_email("unknown@example.com"), false); // Test is_my_user_id function assert.equal(people.is_my_user_id(me.user_id), true);