prevent path queries from being added to history
This commit is contained in:
+4
-2
@@ -876,8 +876,8 @@
|
|||||||
localStorage.clear();
|
localStorage.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
addItem({ query }) {
|
addItem({ isPath, query }) {
|
||||||
if (query.length < this._minChars) return;
|
if (isPath || query.length < this._minChars) return;
|
||||||
let exists;
|
let exists;
|
||||||
|
|
||||||
const history = this._getHistory().map(([item, count]) => {
|
const history = this._getHistory().map(([item, count]) => {
|
||||||
@@ -1171,6 +1171,7 @@
|
|||||||
|
|
||||||
if (splitPath[0] === key) {
|
if (splitPath[0] === key) {
|
||||||
res.key = key;
|
res.key = key;
|
||||||
|
res.isPath = true;
|
||||||
res.split = this._pathDelimiter;
|
res.split = this._pathDelimiter;
|
||||||
res.path = QueryParser._shiftAndTrim(splitPath, res.split);
|
res.path = QueryParser._shiftAndTrim(splitPath, res.split);
|
||||||
|
|
||||||
@@ -1203,6 +1204,7 @@
|
|||||||
|
|
||||||
if (splitPath[0] === key) {
|
if (splitPath[0] === key) {
|
||||||
res.key = key;
|
res.key = key;
|
||||||
|
res.isPath = true;
|
||||||
res.split = this._pathDelimiter;
|
res.split = this._pathDelimiter;
|
||||||
res.path = QueryParser._shiftAndTrim(splitPath, res.split);
|
res.path = QueryParser._shiftAndTrim(splitPath, res.split);
|
||||||
res.redirect = QueryParser._prepPath(url, res.path);
|
res.redirect = QueryParser._prepPath(url, res.path);
|
||||||
|
|||||||
Reference in New Issue
Block a user