Skip to content

Commit 86d5f1a

Browse files
committed
this is the actual fix for the PR
1 parent 2ddb5fd commit 86d5f1a

2 files changed

Lines changed: 5 additions & 7 deletions

File tree

components/project-details/index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,11 @@ class ProjectDetails extends HTMLElement {
126126
render() {
127127
const project = this.Project ?? TPEN.activeProject
128128

129+
if (!project) {
130+
console.error('No project data available to render')
131+
return
132+
}
133+
129134
const manifestKey = JSON.stringify(project?.manifest ?? [])
130135

131136
// Only render if manifest has changed or first render

interfaces/project/index.html

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -87,14 +87,7 @@ <h2 slot="header">Project Details <a id="projectManagementBtn" title="Manage Pro
8787
import TPEN from '../../api/TPEN.js'
8888
import CheckPermissions from '../../components/check-permissions/checkPermissions.js'
8989

90-
function setProjectId() {
91-
document.querySelector('tpen-project-details').setAttribute('tpen-project-id', TPEN.screen.projectInQuery)
92-
}
93-
9490
TPEN.eventDispatcher.on('tpen-project-loaded', (ev) => {
95-
// Set the project ID attribute to trigger controlled render
96-
setProjectId()
97-
9891
const goParse = document.getElementById("goParse")
9992
const goTranscribe = document.getElementById("goTranscribe")
10093
const leaveProject = document.getElementById("leaveProject")

0 commit comments

Comments
 (0)