Skip to content

Commit

Permalink
fixed computed not returning in all cases
Browse files Browse the repository at this point in the history
  • Loading branch information
Severino committed Oct 17, 2023
1 parent c1ebd3b commit c1820df
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions resources/js/components/attribute/Iconclass.vue
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,13 @@
if(state.infoLoaded) {
return state.info.kw[state.language] ? state.info.kw[state.language] : state.info.kw['en'];
}
return []
}),
text: computed(_ => {
if(state.infoLoaded) {
return state.info.txt[state.language] ? state.info.txt[state.language] : state.info.txt['en'];
}
return ''
}),
});
const v = reactive({
Expand Down
1 change: 1 addition & 0 deletions resources/js/components/attribute/Rism.vue
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@
}
return t('main.entity.attributes.rism.doesnt_exist');
}
return ''
}),
});
const v = reactive({
Expand Down
6 changes: 4 additions & 2 deletions resources/js/components/modals/attribute/Edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@
}),
operatorList: computed(_ => {
if(!state.attributeSelected) return [];
switch(state.dependency.attribute.datatype) {
const datatype = state.dependency.attribute.datatype
switch(datatype) {
case 'epoch':
case 'timeperiod':
case 'dimension':
Expand Down Expand Up @@ -419,6 +419,8 @@
return false;
}
});
default:
throw new Error(`Unsupported datatype ${datatype}`);
}
}),
inputType: computed(_ => {
Expand Down
2 changes: 2 additions & 0 deletions resources/js/components/notification/NotificationBody.vue
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,8 @@
return 'comment';
case 'App\\Notifications\\EntityUpdated':
return 'entity';
default:
throw new Error(`Unknown notification type: ${type}`)
}
}),
canReply: computed(_ => {
Expand Down

0 comments on commit c1820df

Please sign in to comment.