diff --git a/app/scripts/directives/nodeForm.js b/app/scripts/directives/nodeForm.js index e6ca544..ea76bc5 100644 --- a/app/scripts/directives/nodeForm.js +++ b/app/scripts/directives/nodeForm.js @@ -81,8 +81,7 @@ angular.module('ffffng') var submitted = false; $scope.hasError = function (field) { - var input = $scope.nodeForm[field]; - return input.$invalid && submitted; + return $scope.nodeForm && $scope.nodeForm[field].$invalid && submitted; }; var duplicateError = {