diff --git a/web/src/peer_data.ts b/web/src/peer_data.ts index 7a087b5916..30074f7f58 100644 --- a/web/src/peer_data.ts +++ b/web/src/peer_data.ts @@ -11,17 +11,9 @@ export function clear_for_testing(): void { stream_subscribers.clear(); } -function assert_number(id: number): void { - if (typeof id !== "number") { - blueslip.error("You must pass ids as numbers to peer_data", {id}); - } -} - function get_user_set(stream_id: number): LazySet { // This is an internal function to get the LazySet of users. // We create one on the fly as necessary, but we warn in that case. - assert_number(stream_id); - if (!sub_store.get(stream_id)) { blueslip.warn(`We called get_user_set for an untracked stream: ${stream_id}`); } diff --git a/web/tests/peer_data.test.js b/web/tests/peer_data.test.js index a92704de1b..169a9fa6bc 100644 --- a/web/tests/peer_data.test.js +++ b/web/tests/peer_data.test.js @@ -275,7 +275,6 @@ test("is_subscriber_subset", () => { blueslip.reset(); // Warn about hypothetical undefined stream_ids. - blueslip.expect("error", "You must pass ids as numbers to peer_data"); blueslip.expect("warn", "We called get_user_set for an untracked stream: undefined"); peer_data.is_subscriber_subset(undefined, sub_a.stream_id); blueslip.reset();