Skip to content

Commit ddf49d2

Browse files
committed
Fix no-migration-needed case
1 parent c29e3eb commit ddf49d2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

app.vue

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ function migrate() {
66
// 1. Migrate the TeX
77
try {
88
const migrated = safeMigrateTex(tex.value);
9-
if (migrated === tex.value) {
9+
if (migrated !== tex.value) {
10+
tex.value = migrated;
11+
message.value = { content: 'Migrated successfully', type: 'success' };
12+
} else {
1013
message.value = { content: 'No need to migrate', type: 'success' };
11-
return;
1214
}
13-
tex.value = migrated;
14-
message.value = { content: 'Migrated successfully', type: 'success' };
1515
} catch (error: any) {
1616
message.value = { content: error?.message ?? 'Unknown error', type: 'error' };
1717
return;

0 commit comments

Comments
 (0)