diff --git a/src/Umbraco.Web.UI.Client/src/views/dictionary/dictionary.list.controller.js b/src/Umbraco.Web.UI.Client/src/views/dictionary/dictionary.list.controller.js index a6121e3afb..788e438936 100644 --- a/src/Umbraco.Web.UI.Client/src/views/dictionary/dictionary.list.controller.js +++ b/src/Umbraco.Web.UI.Client/src/views/dictionary/dictionary.list.controller.js @@ -7,7 +7,9 @@ * The controller for listting dictionary items */ function DictionaryListController($scope, $location, dictionaryResource, localizationService, appState, navigationService) { - var vm = this; + + const vm = this; + vm.title = "Dictionary overview"; vm.loading = false; vm.items = []; @@ -20,11 +22,13 @@ function DictionaryListController($scope, $location, dictionaryResource, localiz vm.loading = true; dictionaryResource.getList() - .then(function (data) { - vm.items = data; - vm.items.forEach(function(item){ - item.style = { "paddingLeft": item.level * 10 }; + .then(data => { + let items = data || []; + + items.forEach(item => { + item.style = { "paddingLeft": item.level * 10 }; }); + vm.items = items; vm.loading = false; }); } @@ -47,7 +51,7 @@ function DictionaryListController($scope, $location, dictionaryResource, localiz vm.createNewItem = createNewItem; function onInit() { - localizationService.localize("dictionaryItem_overviewTitle").then(function (value) { + localizationService.localize("dictionaryItem_overviewTitle").then(value => { vm.title = value; }); diff --git a/src/Umbraco.Web.UI.Client/src/views/dictionary/list.html b/src/Umbraco.Web.UI.Client/src/views/dictionary/list.html index 43fe6c45ec..0acd6ae0a3 100644 --- a/src/Umbraco.Web.UI.Client/src/views/dictionary/list.html +++ b/src/Umbraco.Web.UI.Client/src/views/dictionary/list.html @@ -1,9 +1,6 @@
| @@ -69,8 +68,8 @@ |
|---|