mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2024-11-29 05:49:07 +08:00
fix: 解决文件搜索不存在的资源后,点击下面存在的目录也会提示资源不存在的问题 (#896)
This commit is contained in:
parent
4f168656fc
commit
28ebf7a0cc
@ -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…
Reference in New Issue
Block a user