Skip to content

Commit

Permalink
Merge pull request #107 from lcnetdev/unfreeze-cutter
Browse files Browse the repository at this point in the history
Cutter Tool Fixes
  • Loading branch information
f-osorio authored Oct 29, 2024
2 parents f8bb8e5 + d7606aa commit 8cfb0d4
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/components/panels/edit/modals/ComplexLookupModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,10 @@
this.activeContext = {
"contextValue": true,
"source": [],
"type": (toLoad != null && toLoad.literal) ? "Literal Value" : null,
"type": (toLoad !== null && toLoad.literal) ? "Literal Value" : null,
"variant": [],
"uri": (toLoad.literal) ? null : toLoad.uri,
"title": toLoad.label,
"uri": (toLoad == null || toLoad.literal) ? null : toLoad.uri,
"title": toLoad !== null ? toLoad.label : "",
"contributor": [],
"date": null,
"genreForm": null,
Expand All @@ -278,8 +278,13 @@
return false
}
let results = await utilsNetwork.returnContext(toLoad.uri)
results.loading = false
let results = null
try {
results = await utilsNetwork.returnContext(toLoad.uri)
results.loading = false
} catch {
results = null
}
// if this happens it means they selected something else very quickly
// so don't go on and set it to this context, because its no longer the one they have selected
Expand Down
8 changes: 8 additions & 0 deletions src/stores/profile.js
Original file line number Diff line number Diff line change
Expand Up @@ -895,6 +895,14 @@ export const useProfileStore = defineStore('profile', {
// let lastProperty = propertyPath.at(-1).propertyURI
// // locate the correct pt to work on in the activeProfile
let pt = utilsProfile.returnPt(this.activeProfile,componentGuid)

//should be safe to delete the cache when swaping templates
if (Object.keys(cachePt).includes(componentGuid)){
delete cachePt[componentGuid]
}
for (let guid of Object.keys(cacheGuid)){
cleanCacheGuid(cacheGuid, JSON.parse(JSON.stringify(pt.userValue)), guid)
}

if (pt !== false){

Expand Down

0 comments on commit 8cfb0d4

Please sign in to comment.