Don't error out on a name change for a stream you're not on.

(imported from commit 8438087b3b6c66f41b9d9152661a93f01a086b28)
This commit is contained in:
Jessica McKellar 2013-09-18 13:57:38 -04:00
parent d88266b41d
commit e73e3d1bac
1 changed files with 5 additions and 0 deletions

View File

@ -120,6 +120,11 @@ function update_stream_notifications(sub, value) {
} }
function update_stream_name(sub, new_name) { function update_stream_name(sub, new_name) {
if (sub === undefined) {
// This isn't a stream we know about, so ignore it.
return;
}
// Rename the stream internally. // Rename the stream internally.
var old_name = sub.name; var old_name = sub.name;
stream_data.delete_sub(old_name); stream_data.delete_sub(old_name);