mirror of
https://github.com/zulip/zulip.git
synced 2025-11-04 14:03:30 +00:00
stream_edit: Use narrow_state.stream_sub instead of narrow_state.stream.
We use narrow_state.stream_sub instead of narrow_state.stream to directly get the sub object instead of stream name, while subscribing to a stream from the stream narrow.
This commit is contained in:
@@ -593,11 +593,11 @@ exports.initialize = function () {
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
const stream_name = narrow_state.stream();
|
||||
if (stream_name === undefined) {
|
||||
const sub = narrow_state.stream_sub();
|
||||
if (sub === undefined) {
|
||||
return;
|
||||
}
|
||||
const sub = stream_data.get_sub(stream_name);
|
||||
|
||||
subs.sub_or_unsub(sub);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user