Don't follow the prototype chain when looking for a folder name (fixes #1387)

This commit is contained in:
Jakob Borg
2015-03-01 22:10:34 +01:00
parent 32847f33fd
commit b3dd05580b
2 changed files with 2 additions and 2 deletions

View File

@@ -7,7 +7,7 @@ angular.module('syncthing.core')
if (scope.editingExisting) {
// we shouldn't validate
ctrl.$setValidity('uniqueFolder', true);
} else if (scope.folders[viewValue]) {
} else if (scope.folders.hasOwnProperty(viewValue)) {
// the folder exists already
ctrl.$setValidity('uniqueFolder', false);
} else {