Fixes JS with the content picker
This commit is contained in:
@@ -161,6 +161,10 @@ function umbRequestHelper($http, $q, notificationsService, eventsService, formHe
|
||||
|
||||
}, function (response) {
|
||||
|
||||
if (!response) {
|
||||
return; //sometimes oddly this happens, nothing we can do
|
||||
}
|
||||
|
||||
if (!response.status && response.message && response.stack) {
|
||||
//this is a JS/angular error that we should deal with
|
||||
return $q.reject({
|
||||
|
||||
@@ -105,6 +105,10 @@ function contentPickerController($scope, entityResource, editorState, iconHelper
|
||||
};
|
||||
|
||||
if ($scope.model.config) {
|
||||
//special case, if the `startNode` is falsy on the server config delete it entirely so the default value is merged in
|
||||
if (!$scope.model.config.startNode) {
|
||||
delete $scope.model.config.startNode;
|
||||
}
|
||||
//merge the server config on top of the default config, then set the server config to use the result
|
||||
$scope.model.config = angular.extend(defaultConfig, $scope.model.config);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user