From 9dbbdb1cdfa306e28fa9b07fcde7e625f7b30ca8 Mon Sep 17 00:00:00 2001 From: Tim Abbott Date: Mon, 22 Jul 2013 17:22:50 -0400 Subject: [PATCH] Avoid get_updates failing to update following bugged update_person events. (imported from commit 7785277ab967a67135e1bd4aa226a0d64adccaba) --- zephyr/static/js/zephyr.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/zephyr/static/js/zephyr.js b/zephyr/static/js/zephyr.js index a185a1f4b1..03122e6695 100644 --- a/zephyr/static/js/zephyr.js +++ b/zephyr/static/js/zephyr.js @@ -59,6 +59,11 @@ function update_person(person) { // that can change, this will need to either get complicated or be // replaced by MVC var i; + if (people_dict[person.email] === undefined) { + blueslip.error("Got update_person event for unexpected user", + {email: person.email}); + return; + } people_dict[person.email].full_name = person.full_name; for (i = 0; i < page_params.people_list.length; i++) { if (page_params.people_list[i].email === person.email) {