Skip to content

Commit

Permalink
prefer selected script heatmaps (xbapps#1487)
Browse files Browse the repository at this point in the history
  • Loading branch information
peter23231 authored Nov 13, 2023
1 parent 573ebb2 commit 3d4710d
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions ui/src/views/scenes/SceneCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -168,8 +168,17 @@ export default {
getHeatmapURL (fileId) {
return `/api/dms/heatmap/${fileId}`
},
getFunscript () {
return this.item.file !== null && this.item.file.find(a => a.type === 'script' && a.has_heatmap);
getFunscript() {
if (this.item.file !== null) {
let script;
if (script = this.item.file.find((a) => a.type === 'script' && a.has_heatmap && a.is_selected_script)) {
return script
}
if (script = this.item.file.find((a) => a.type === 'script' && a.has_heatmap)) {
return script
}
}
return false;
}
}
}
Expand Down

0 comments on commit 3d4710d

Please sign in to comment.