Skip to content

Commit

Permalink
Fix issue with literals in subjects
Browse files Browse the repository at this point in the history
The subject builder was encountering an error when there was a literal
because the `uri` was `null` and `.includes()` hit an error
  • Loading branch information
f-osorio committed Jan 7, 2025
1 parent 0dbff84 commit db08865
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions src/components/panels/edit/modals/SubjectEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2486,11 +2486,14 @@ methods: {
for (let component in frozenComponents){
// if (this.components[component].complex && !['madsrdf:Geographic', 'madsrdf:HierarchicalGeographic'].includes(this.components[component].type)){
const target = frozenComponents[component]
if (!(['madsrdf:Geographic', 'madsrdf:HierarchicalGeographic'].includes(target.type) || target.uri.includes("childrensSubjects/sj")) && target.complex){
if (!(['madsrdf:Geographic', 'madsrdf:HierarchicalGeographic'].includes(target.type) || (target.uri && target.uri.includes("childrensSubjects/sj"))) && target.complex){
let uri = target.uri
let data = false //await this.parseComplexSubject(uri) //This can take a while, and is only need for the URI, but lots of things don't have URIs
data = await this.parseComplexSubject(uri)
if (uri){
data = await this.parseComplexSubject(uri)
} else {
data = target
}
let subs
subs = target.marcKey.slice(5)
Expand Down
2 changes: 1 addition & 1 deletion src/stores/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ export const useConfigStore = defineStore('config', {

versionMajor: 0,
versionMinor: 17,
versionPatch: 14,
versionPatch: 15,

regionUrls: {

Expand Down

0 comments on commit db08865

Please sign in to comment.