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

Commit

Permalink
fix(parserResult): Ignore undefined parserResult when using custom tpl
Browse files Browse the repository at this point in the history
Fixes #1597
  • Loading branch information
katemihalikova committed May 16, 2016
1 parent 2133f82 commit cee24e5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/uiSelectMultipleDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ uis.directive('uiSelectMultiple', ['uiSelectMinErr','$timeout', function(uiSelec

// From model --> view
ngModel.$formatters.unshift(function (inputValue) {
var data = $select.parserResult.source (scope, { $select : {search:''}}), //Overwrite $search
var data = $select.parserResult && $select.parserResult.source (scope, { $select : {search:''}}), //Overwrite $search
locals = {},
result;
if (!data) return inputValue;
Expand Down
2 changes: 1 addition & 1 deletion src/uiSelectSingleDirective.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ uis.directive('uiSelectSingle', ['$timeout','$compile', function($timeout, $comp

//From model --> view
ngModel.$formatters.unshift(function (inputValue) {
var data = $select.parserResult.source (scope, { $select : {search:''}}), //Overwrite $search
var data = $select.parserResult && $select.parserResult.source (scope, { $select : {search:''}}), //Overwrite $search
locals = {},
result;
if (data){
Expand Down

0 comments on commit cee24e5

Please sign in to comment.