Explorar o código

use nodePath.resolve

Shun Miyazawa %!s(int64=4) %!d(string=hai) anos
pai
achega
96a5ccfd5c
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      packages/app/src/components/Sidebar/PageTree/Item.tsx

+ 1 - 1
packages/app/src/components/Sidebar/PageTree/Item.tsx

@@ -262,7 +262,7 @@ const Item: FC<ItemProps> = (props: ItemProps) => {
 
   const onPressEnterForRenameHandler = async(inputText: string) => {
     const parentPath = pathUtils.addTrailingSlash(nodePath.dirname(page.path ?? ''));
-    const newPagePath = `${parentPath}${inputText}`;
+    const newPagePath = nodePath.resolve(parentPath, inputText);
 
     if (newPagePath === page.path) {
       setRenameInputShown(false);