We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0731597 commit 0dd5e57Copy full SHA for 0dd5e57
app/preprints/-components/submit/file/upload-file/component.ts
@@ -89,7 +89,9 @@ export default class PreprintUpload extends Component<PreprintUploadArgs> {
89
@waitFor
90
async success(_: any, __:any, file: FileModel): Promise<void> {
91
if (this.args.isEdit) {
92
- await this.primaryFile?.rename(file.name);
+ if (file.name !== this.primaryFile?.name) {
93
+ await this.primaryFile?.rename(file.name);
94
+ }
95
} else {
96
const primaryFile = await this.rootFolder!.files;
97
this.args.manager.preprint.set('primaryFile', primaryFile.firstObject);
0 commit comments