Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

narrow_history: Use a more accurate way to check hashchange status.

Aman Agrawal24f47e89931f
diff --git a/web/src/narrow_history.ts b/web/src/narrow_history.ts
index 4b2259e1370..831eb4cb065 100644
--- a/web/src/narrow_history.ts
+++ b/web/src/narrow_history.ts
@@ -1,7 +1,7 @@
import _ from "lodash";
import assert from "minimalistic-assert";
-import * as hash_util from "./hash_util";
+import * as browser_history from "./browser_history";
import * as message_lists from "./message_lists";
import * as narrow_state from "./narrow_state";
@@ -17,7 +17,7 @@ function _save_narrow_state(): void {
assert(message_lists.current !== undefined);
// We don't want to save state in the middle of a narrow change
// to the wrong hash.
- if (hash_util.search_terms_to_hash(current_filter.terms()) !== window.location.hash) {
+ if (browser_history.state.changing_hash) {
return;
}