fixes js null issue with boolean.controller

This commit is contained in:
Shannon
2016-03-08 15:53:45 +01:00
parent 372a768dca
commit 2a2f22c7d9

View File

@@ -4,8 +4,8 @@ function booleanEditorController($scope, $rootScope, assetsService) {
$scope.renderModel = {
value: false
};
if($scope.model.config.default.toString() === "1" && $scope.model && !$scope.model.value) {
if ($scope.model.config.default && $scope.model.config.default.toString() === "1" && $scope.model && !$scope.model.value) {
$scope.renderModel.value = true;
}