mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 14:35:27 +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.preventDefault();
|
||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
|
|
||||||
const stream_name = narrow_state.stream();
|
const sub = narrow_state.stream_sub();
|
||||||
if (stream_name === undefined) {
|
if (sub === undefined) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const sub = stream_data.get_sub(stream_name);
|
|
||||||
subs.sub_or_unsub(sub);
|
subs.sub_or_unsub(sub);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user