diff --git a/src/typeahead/test/typeahead.spec.js b/src/typeahead/test/typeahead.spec.js index c8c2b4d1d9..a2c7d5e2ce 100644 --- a/src/typeahead/test/typeahead.spec.js +++ b/src/typeahead/test/typeahead.spec.js @@ -274,7 +274,6 @@ describe('typeahead tests', function () { $templateCache.put('custom.html', '

{{ index }} {{ match.label }}

'); var element = prepareInputEl('
'); - var inputEl = findInput(element); changeInputValueTo(element, 'Al'); @@ -341,7 +340,6 @@ describe('typeahead tests', function () { $scope.$label = $label; }; var element = prepareInputEl('
'); - var inputEl = findInput(element); changeInputValueTo(element, 'Alas'); triggerKeyDown(element, 13); @@ -447,7 +445,6 @@ describe('typeahead tests', function () { it('issue 231 - closes matches popup on click outside typeahead', function () { var element = prepareInputEl('
'); - var inputEl = findInput(element); changeInputValueTo(element, 'b'); @@ -513,7 +510,6 @@ describe('typeahead tests', function () { }); }; var element = prepareInputEl('
'); - var inputEl = findInput(element); changeInputValueTo(element, 'match'); $scope.$digest(); diff --git a/src/typeahead/typeahead.js b/src/typeahead/typeahead.js index 3aa213e79c..8b1dba873e 100644 --- a/src/typeahead/typeahead.js +++ b/src/typeahead/typeahead.js @@ -12,7 +12,7 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.position', 'ui.bootstrap return { parse:function (input) { - var match = input.match(TYPEAHEAD_REGEXP), modelMapper, viewMapper, source; + var match = input.match(TYPEAHEAD_REGEXP); if (!match) { throw new Error( 'Expected typeahead specification in form of "_modelValue_ (as _label_)? for _item_ in _collection_"' +