From 3caa76a83b5324734e5d57ded17b4a9855b726ad Mon Sep 17 00:00:00 2001 From: kether667 Date: Fri, 22 May 2015 09:25:27 -0700 Subject: [PATCH] fixing issue while locking elements with bind to single property and async loading _uiSelectChoiceLocked cannot be assigned to primitive type --- src/uiSelectController.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/uiSelectController.js b/src/uiSelectController.js index a2959566f..6605bd32a 100644 --- a/src/uiSelectController.js +++ b/src/uiSelectController.js @@ -323,7 +323,10 @@ uis.controller('uiSelectCtrl', if (item && !angular.isUndefined(ctrl.lockChoiceExpression)) { isLocked = !!(itemScope.$eval(ctrl.lockChoiceExpression)); // force the boolean value - item._uiSelectChoiceLocked = isLocked; // store this for later reference + //we need to check if it's an object while doing bind to single property and async loading + if(typeof(item) === 'object') { + item._uiSelectChoiceLocked = isLocked; // store this for later reference + } } return isLocked;