From 9bf6f408cc0f40ee1c4644a03e5486f399e281c3 Mon Sep 17 00:00:00 2001 From: Samuel Beek Date: Tue, 26 May 2015 09:46:13 +0200 Subject: [PATCH] Replaced preventDefault with preventDefault() The preventDefault used to cause a JSLint error "Expected an assignment or function call and instead saw an expression." --- angucomplete.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/angucomplete.js b/angucomplete.js index 734e9a2..7a859f1 100644 --- a/angucomplete.js +++ b/angucomplete.js @@ -204,7 +204,7 @@ angular.module('angucomplete', [] ) if ($scope.results && ($scope.currentIndex + 1) < $scope.results.length) { $scope.currentIndex ++; $scope.$apply(); - event.preventDefault; + event.preventDefault(); event.stopPropagation(); } @@ -213,7 +213,7 @@ angular.module('angucomplete', [] ) if ($scope.currentIndex >= 1) { $scope.currentIndex --; $scope.$apply(); - event.preventDefault; + event.preventDefault(); event.stopPropagation(); } @@ -221,12 +221,12 @@ angular.module('angucomplete', [] ) if ($scope.results && $scope.currentIndex >= 0 && $scope.currentIndex < $scope.results.length) { $scope.selectResult($scope.results[$scope.currentIndex]); $scope.$apply(); - event.preventDefault; + event.preventDefault(); event.stopPropagation(); } else { $scope.results = []; $scope.$apply(); - event.preventDefault; + event.preventDefault(); event.stopPropagation(); }