Skip to content

Commit

Permalink
Merge pull request #404 from leekelleher/hotfix/5.0.1
Browse files Browse the repository at this point in the history
Preparing v5.0.1 release
  • Loading branch information
leekelleher authored Jun 9, 2024
2 parents 30661c9 + 2c5e415 commit 7eeae46
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
5.0.0
5.0.1
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,7 @@ angular.module("umbraco").controller("Umbraco.Community.Contentment.DataEditors.
config.currentPageId = -1;
}

$scope.model.value = $scope.model.value || config.defaultValue;

if (Array.isArray($scope.model.value) === false) {
$scope.model.value = [$scope.model.value];
}
ensureValueIsArray();

if (Array.isArray(config.displayMode) === true) {
config.displayMode = config.displayMode[0];
Expand Down Expand Up @@ -120,6 +116,8 @@ angular.module("umbraco").controller("Umbraco.Community.Contentment.DataEditors.
},
submit: function (selection) {

ensureValueIsArray();

if (selection) {
Object.entries(selection).forEach(item => {
vm.itemLookup[item[0]] = item[1];
Expand All @@ -141,6 +139,14 @@ angular.module("umbraco").controller("Umbraco.Community.Contentment.DataEditors.
});
};

function ensureValueIsArray() {
$scope.model.value = $scope.model.value || config.defaultValue;

if (Array.isArray($scope.model.value) === false) {
$scope.model.value = [$scope.model.value];
}
}

function load() {
if ($scope.model.value.length) {
vm.loading = true;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<Product>Umbraco.Community.Contentment</Product>
<Title>Contentment for Umbraco</Title>
<Description>Contentment, a collection of components for Umbraco.</Description>
<Version>5.0.0</Version>
<Version>5.0.1</Version>
<Authors>Lee Kelleher</Authors>
<Company>Lee Kelleher</Company>
<Copyright>$([System.DateTime]::Now.Year) © $(Company)</Copyright>
Expand Down Expand Up @@ -47,8 +47,9 @@

<ItemGroup>
<Compile Remove="node_modules\**;wwwroot\**" />
<Content Remove="package.json;package-lock.json" />
<EmbeddedResource Remove="node_modules\**;wwwroot\**" />
<None Remove="node_modules\**;wwwroot\**" />
<None Remove="node_modules\**;wwwroot\**;package.json;package-lock.json" />
</ItemGroup>

<Target Name="RemoveLuceneAnalyzer" BeforeTargets="CoreCompile">
Expand Down

0 comments on commit 7eeae46

Please sign in to comment.