Skip to content

Commit

Permalink
fix: activityId error show (#42)
Browse files Browse the repository at this point in the history
close #42
  • Loading branch information
lisonge committed Dec 21, 2024
1 parent cc19cd9 commit 6b6028e
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions src/views/snapshot/WindowCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,13 @@ const isSystem = computed(() => {
return getAppInfo(snapshot.value).isSystem;
});
const activityId = computed(() => {
if (!snapshot.value.activityId || !snapshot.value.appId) return '';
if (
snapshot.value.activityId.startsWith(snapshot.value.appId) &&
snapshot.value.activityId.length > snapshot.value.appId.length
) {
return snapshot.value.activityId.substring(snapshot.value.appId.length);
const v = snapshot.value.activityId;
const appId = snapshot.value.appId;
if (!v || !appId) return '';
if (v.startsWith(appId) && v[appId.length] === '.') {
return v.substring(appId.length);
}
return snapshot.value.activityId;
return v;
});
const onDelete = async () => {
Expand Down

0 comments on commit 6b6028e

Please sign in to comment.