Skip to content

Commit 2ddb5fd

Browse files
committed
Reset manifest key; rename render function
Clear _currentManifestKey during component cleanup to avoid retaining stale manifest state. Also rename the top-level render() function in manage-project to applyProjectContext() and update its invocation to better reflect that it applies project context with permission checks.
1 parent afc3800 commit 2ddb5fd

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

components/project-details/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,7 @@ class ProjectDetails extends HTMLElement {
120120
try { this._unsubProject?.() } catch {}
121121
this.renderCleanup.run()
122122
this.cleanup.run()
123+
this._currentManifestKey = null
123124
}
124125

125126
render() {

interfaces/manage-project/index.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,8 @@ TPEN.eventDispatcher.on('tpen-project-loaded', () => {
4242
leaveProjectBtn.href = `/project/leave?projectID=${projectID}`
4343
}
4444

45-
// Render the page with permissions check
46-
render()
45+
// Apply project context with permissions check
46+
applyProjectContext()
4747
})
4848

4949
document.getElementById('export-project-btn').addEventListener('click', async () => {
@@ -63,7 +63,7 @@ document.getElementById('export-project-btn').addEventListener('click', async ()
6363
})
6464
})
6565

66-
function render() {
66+
function applyProjectContext() {
6767
const isManageProjectPermission = CheckPermissions.checkEditAccess('PROJECT')
6868
if(!isManageProjectPermission) {
6969
alert("You do not have permissions to use this page.")

0 commit comments

Comments
 (0)