浏览代码

[frontent] move removeLastSlash function up one level

Björn Alm 2 年之前
父节点
当前提交
d265748c98
共有 1 个文件被更改,包括 7 次插入7 次删除
  1. 7 7
      apps/filebrowser/src/filebrowser/templates/listdir_components.mako

+ 7 - 7
apps/filebrowser/src/filebrowser/templates/listdir_components.mako

@@ -1452,14 +1452,14 @@ else:
         });
       };
       
-      self.allowCopyMoveTo = function (destination) {
-        const removeLastSlash = function (path) {
-          if (path.charAt(path.length - 1) === '/') {
-            return path.slice(0, -1);
-          }
-          return path;
-        };
+      const removeLastSlash = function (path) {
+        if (path.charAt(path.length - 1) === '/') {
+          return path.slice(0, -1);
+        }
+        return path;
+      };
 
+      self.allowCopyMoveTo = function (destination) {
         const source = self.currentPath();
         return removeLastSlash(source) !== removeLastSlash(destination);
       };