mirror of
https://github.com/xvvvyz/tilde.git
synced 2026-03-11 14:44:24 +00:00
prevent path queries from being added to history
This commit is contained in:
parent
82d82ae8a5
commit
e45c9c0ed2
1 changed files with 4 additions and 2 deletions
|
|
@ -876,8 +876,8 @@
|
|||
localStorage.clear();
|
||||
}
|
||||
|
||||
addItem({ query }) {
|
||||
if (query.length < this._minChars) return;
|
||||
addItem({ isPath, query }) {
|
||||
if (isPath || query.length < this._minChars) return;
|
||||
let exists;
|
||||
|
||||
const history = this._getHistory().map(([item, count]) => {
|
||||
|
|
@ -1171,6 +1171,7 @@
|
|||
|
||||
if (splitPath[0] === key) {
|
||||
res.key = key;
|
||||
res.isPath = true;
|
||||
res.split = this._pathDelimiter;
|
||||
res.path = QueryParser._shiftAndTrim(splitPath, res.split);
|
||||
|
||||
|
|
@ -1203,6 +1204,7 @@
|
|||
|
||||
if (splitPath[0] === key) {
|
||||
res.key = key;
|
||||
res.isPath = true;
|
||||
res.split = this._pathDelimiter;
|
||||
res.path = QueryParser._shiftAndTrim(splitPath, res.split);
|
||||
res.redirect = QueryParser._prepPath(url, res.path);
|
||||
|
|
|
|||
Loading…
Reference in a new issue