Skip to content
This repository has been archived by the owner on May 29, 2019. It is now read-only.

Commit

Permalink
fix(typeahead): return null if empty
Browse files Browse the repository at this point in the history
- Return `null` instead to unify falsy values
  • Loading branch information
wesleycho committed Aug 2, 2015
1 parent ff37fb6 commit 268353d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/typeahead/typeahead.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ angular.module('ui.bootstrap.typeahead', ['ui.bootstrap.position', 'ui.bootstrap
if (!inputValue) {
// Reset in case user had typed something previously.
modelCtrl.$setValidity('editable', true);
return inputValue;
return null;
} else {
modelCtrl.$setValidity('editable', false);
return undefined;
Expand Down

0 comments on commit 268353d

Please sign in to comment.