Fixes JS with the content picker

This commit is contained in:
Shannon
2019-02-11 15:47:13 +11:00
parent dd54b0324c
commit e35436225f
2 changed files with 8 additions and 0 deletions

View File

@@ -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({

View File

@@ -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);
}