Skip to content

Commit

Permalink
Merge branch 'fixesDataStatementeEdit-556' into 'main'
Browse files Browse the repository at this point in the history
Fixes data statement field init when value is empty

See merge request softwares-pkp/plugins_ojs/dataverse!127
  • Loading branch information
thiagolepidus committed Jul 13, 2023
2 parents aeb4526 + f926215 commit 17a33a1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions js/ui/components/DataStatementForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ pkp.Vue.component('data-statement-form', {
shouldShowField(field) {
const dataStatementTypesField = this.fields.find(
(field) => field.name === 'dataStatementTypes'
)
if (dataStatementTypesField.value === null) {
);
if (!Array.isArray(dataStatementTypesField.value)) {
dataStatementTypesField.value = [];
}
if (
Expand Down
4 changes: 2 additions & 2 deletions version.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
<version>
<application>dataverse</application>
<type>plugins.generic</type>
<release>2.3.1.0</release>
<date>2023-07-12</date>
<release>2.3.2.0</release>
<date>2023-07-13</date>
<lazy-load>1</lazy-load>
<class>DataversePlugin</class>
</version>

0 comments on commit 17a33a1

Please sign in to comment.