Skip to content

Commit d5194b3

Browse files
committed
Disable narrowing types option
1 parent 668cacb commit d5194b3

File tree

2 files changed

+4
-7
lines changed

2 files changed

+4
-7
lines changed

src/components/NotificationItem.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
import dayjs from 'dayjs'
33
import type { MinimalRepository, Thread } from '../api/notifications'
44
import type { NotificationList } from '../types'
5-
import { formatReason, isRepository, notificationSubjectIcon } from '../utils/notification'
5+
import { formatReason, isRepository, isThread, notificationSubjectIcon } from '../utils/notification'
66
import Separator from './Separator.vue'
77
88
interface Emits {
@@ -33,7 +33,7 @@ function handleRepoClick(repo: MinimalRepository) {
3333
>
3434
<button
3535
class="notification-title"
36-
@click="handleRepoClick(value)"
36+
@click="() => isRepository(value) && handleRepoClick(value)"
3737
>
3838
<img
3939
class="notification-title-icon"
@@ -52,7 +52,7 @@ function handleRepoClick(repo: MinimalRepository) {
5252
v-else
5353
class="notification-item"
5454
:class="{ 'notification-item-read': !value.unread }"
55-
@click="handleThreadClick(value)"
55+
@click="() => isThread(value) && handleThreadClick(value)"
5656
>
5757
<Component
5858
:is="notificationSubjectIcon(value.subject.type)"

tsconfig.json

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,5 @@
1414
"skipLibCheck": true
1515
},
1616
"include": ["src/**/*.ts", "src/**/*.d.ts", "src/**/*.tsx", "src/**/*.vue", ".github/**/*.ts"],
17-
"references": [{ "path": "./tsconfig.node.json" }],
18-
"vueCompilerOptions": {
19-
"narrowingTypesInInlineHandlers": true
20-
}
17+
"references": [{ "path": "./tsconfig.node.json" }]
2118
}

0 commit comments

Comments
 (0)