From 60e8630413cf1609147d83397fbf65b2fe2d9042 Mon Sep 17 00:00:00 2001 From: Simon Frei Date: Mon, 26 Apr 2021 15:35:12 +0200 Subject: [PATCH] gui: Handle empty path in validation (ref #7379) (#7595) --- gui/default/syncthing/core/pathIsSubDirDirective.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gui/default/syncthing/core/pathIsSubDirDirective.js b/gui/default/syncthing/core/pathIsSubDirDirective.js index 002b1fd20..38674d91f 100644 --- a/gui/default/syncthing/core/pathIsSubDirDirective.js +++ b/gui/default/syncthing/core/pathIsSubDirDirective.js @@ -24,6 +24,9 @@ angular.module('syncthing.core') scope.folderPathErrors.isParent = false; scope.folderPathErrors.otherID = ""; scope.folderPathErrors.otherLabel = ""; + if (!viewValue) { + return true; + } for (var folderID in scope.folders) { if (folderID === scope.currentFolder.id) { continue;