From 07edc87cb917ffa2609aeeb28898ac075db242cc Mon Sep 17 00:00:00 2001 From: Reid Barton Date: Thu, 17 Jan 2013 15:35:31 -0500 Subject: [PATCH] Fix subscribe-and-send When not in lurk mode, lurk_stream is undefined which caused lurk_stream.toLowerCase() to fail. (imported from commit 63ce79083b55a37cb0455871237a76d724fbbbea) --- zephyr/static/js/compose.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/zephyr/static/js/compose.js b/zephyr/static/js/compose.js index 1b6b5eadb2..f925a9dc2b 100644 --- a/zephyr/static/js/compose.js +++ b/zephyr/static/js/compose.js @@ -302,7 +302,8 @@ function validate_stream_message() { // browser window doesn't know it. return true; case "not-subscribed": - if (lurk_stream.toLowerCase() === stream_name.toLowerCase()) { + if (lurk_stream !== undefined && + lurk_stream.toLowerCase() === stream_name.toLowerCase()) { // Just subscribe them. subs.subscribe_for_send(stream_name); // When the subscription request completes,