aboutsummaryrefslogtreecommitdiff
path: root/src/client/util/History.ts
diff options
context:
space:
mode:
authorusodhi <61431818+usodhi@users.noreply.github.com>2020-04-24 00:43:56 +0530
committerusodhi <61431818+usodhi@users.noreply.github.com>2020-04-24 00:43:56 +0530
commit847f01833d3a078f76432e2e9d903e5804093b0a (patch)
treeb5d1a9227c1a90ea8e62567a3aa2ec87ed933c73 /src/client/util/History.ts
parent36eefd94f5f5d3bc08f1f1dea31d0b752a2070c3 (diff)
parent8a8f2c8848fe76e26188666790accaf236267e78 (diff)
Merge branch 'master' of https://github.com/browngraphicslab/Dash-Web into grid_view_secondary
Diffstat (limited to 'src/client/util/History.ts')
-rw-r--r--src/client/util/History.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/client/util/History.ts b/src/client/util/History.ts
index 545e8acb4..2c53d7e52 100644
--- a/src/client/util/History.ts
+++ b/src/client/util/History.ts
@@ -40,8 +40,12 @@ export namespace HistoryUtil {
// }
}
+ let _lastStatePush = 0;
export function pushState(state: ParsedUrl) {
- history.pushState(state, "", createUrl(state));
+ if (Date.now() - _lastStatePush > 1000) {
+ history.pushState(state, "", createUrl(state));
+ }
+ _lastStatePush = Date.now();
}
export function replaceState(state: ParsedUrl) {