mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-11-17 22:28:45 +08:00
fix: 解决文件搜索不存在的资源后,点击下面存在的目录也会提示资源不存在的问题 (#896)
This commit is contained in:
parent
4f168656fc
commit
28ebf7a0cc
1 changed files with 2 additions and 0 deletions
|
|
@ -356,6 +356,7 @@ const back = () => {
|
|||
};
|
||||
|
||||
const jump = async (url: string) => {
|
||||
const oldUrl = req.path;
|
||||
// reset search params before exec jump
|
||||
Object.assign(req, initData());
|
||||
req.path = url;
|
||||
|
|
@ -364,6 +365,7 @@ const jump = async (url: string) => {
|
|||
let searchResult = await searchFile();
|
||||
// check search result,the file is exists?
|
||||
if (!searchResult.data.path) {
|
||||
req.path = oldUrl;
|
||||
MsgWarning(i18n.global.t('commons.res.notFound'));
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue