Skip to content

Commit d28567d

Browse files
committed
Refactor to use the abstracted method
1 parent 341031c commit d28567d

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ export default class Supplements extends Component<SupplementsArgs>{
6969
@waitFor
7070
public async removeSelectedProject(): Promise<void> {
7171
try {
72-
this.args.manager.validateSupplements(false);
72+
this.validate(false);
7373
await this.args.manager.preprint.removeM2MRelationship('node'); // Remove relationship
7474
// Remove relationship on the node side, this only clears the cache locally
7575
this.args.manager.preprint.node.get('preprints')
@@ -90,7 +90,7 @@ export default class Supplements extends Component<SupplementsArgs>{
9090
}
9191

9292
@action
93-
public validate(): void {
94-
this.args.manager.validateSupplements(true);
93+
public validate(isValid = true): void {
94+
this.args.manager.validateSupplements(isValid);
9595
}
9696
}

0 commit comments

Comments
 (0)