mirror of
https://github.com/zulip/zulip.git
synced 2025-11-01 20:44:04 +00:00
Use stream_id for by_stream__uri().
The stream_list test that was fixed here was sort of broken. It accomplished the main goal of verifying what gets rendered, but now the data setup part is more like the actual app code (and simpler, too).
This commit is contained in:
@@ -195,9 +195,9 @@ exports.initialize = function () {
|
||||
e.preventDefault();
|
||||
// Note that we may have an href here, but we trust the stream id more,
|
||||
// so we re-encode the hash.
|
||||
var stream = stream_data.get_sub_by_id($(this).attr('data-stream-id'));
|
||||
if (stream) {
|
||||
hashchange.go_to_location(hash_util.by_stream_uri(stream.name));
|
||||
var stream_id = $(this).attr('data-stream-id');
|
||||
if (stream_id) {
|
||||
hashchange.go_to_location(hash_util.by_stream_uri(stream_id));
|
||||
return;
|
||||
}
|
||||
window.location.href = $(this).attr('href');
|
||||
|
||||
Reference in New Issue
Block a user