Commit d3beec7f authored by Phil Hughes's avatar Phil Hughes

Replace state for when initially setting the URL

This saves pushing the state & creating a new history entry
parent a5fafb49
......@@ -70,7 +70,7 @@ $(() => {
splitPath = [milestoneTitleParam].concat(splitPath);
Store.filter.path = splitPath.join('&');
Store.updateFiltersUrl();
Store.updateFiltersUrl(true);
}
gl.boardService = new BoardService(this.endpoint, this.bulkUpdatePath, this.boardId);
......
......@@ -124,8 +124,12 @@
return list[key] === val && byType;
})[0];
},
updateFiltersUrl () {
updateFiltersUrl (replaceState = false) {
if (replaceState) {
history.replaceState(null, null, `?${this.filter.path}`);
} else {
history.pushState(null, null, `?${this.filter.path}`);
}
}
};
})();
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment