Created
May 12, 2016 06:10
-
-
Save gerardvcruz/bd82dd37b5b8af2d3b19788c9aff0a91 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// <input ng-model="foobar"> | |
// $scope.foobar is an object with attribute 'baz' | |
$scope.foo = _.map($scope.barArray, function(bar) { | |
if(bar.baz === $scope.foobar.baz) { | |
return bar; | |
} | |
}); | |
// after uglifying, i cannot access $scope.foobar.baz in the _.map anymore | |
// the error is something like 'Undefined method or variable baz for null' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment