Skip to content
This repository was archived by the owner on Apr 14, 2026. It is now read-only.

Commit be19bfa

Browse files
authored
Fixed the caching and errors of a preprint supplement (#2543)
- Ticket: [ENG-6326] ## Purpose Prevent supplements from caching on the review page after removal ## Summary of Changes Reviewed the preprint from the node which was reverse of what was happening
1 parent da04df5 commit be19bfa

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

app/preprints/-components/submit/supplements/component.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ export default class Supplements extends Component<SupplementsArgs>{
7070
public async removeSelectedProject(): Promise<void> {
7171
try {
7272
await this.args.manager.preprint.removeM2MRelationship('node'); // Remove relationship
73-
this.args.manager.preprint.set('node', null); // Ensure local cache is updated
73+
// Remove relationship on the node side, this only clears the cache locally
74+
this.args.manager.preprint.node.get('preprints')
75+
.removeObject(this.args.manager.preprint);
7476
this.isSupplementAttached = false;
7577
this.validate();
7678
} catch (error) {

0 commit comments

Comments
 (0)