File tree 2 files changed +15
-15
lines changed
2 files changed +15
-15
lines changed Original file line number Diff line number Diff line change @@ -49,21 +49,21 @@ let $links = map<PreviewLinksValue>({})
49
49
50
50
export const previewUrl = computed ( $links , links => Object . keys ( links ) [ 0 ] ?? '' )
51
51
52
- export const previewUrlError = computed <
53
- 'invalidUrl' | 'unloadable' | undefined ,
54
- typeof $ links
55
- > ( $links , links => {
56
- let first = Object . keys ( links ) [ 0 ]
57
- if ( typeof first !== 'undefined' ) {
58
- let link = links [ first ] !
59
- if ( link . state === 'invalid' ) {
60
- return link . error
61
- } else if ( link . state === 'unloadable' ) {
62
- return 'unloadable'
52
+ export const previewUrlError = computed (
53
+ $links ,
54
+ ( links ) : 'invalidUrl' | 'unloadable' | undefined => {
55
+ let first = Object . keys ( links ) [ 0 ]
56
+ if ( typeof first !== 'undefined' ) {
57
+ let link = links [ first ] !
58
+ if ( link . state === 'invalid' ) {
59
+ return link . error
60
+ } else if ( link . state === 'unloadable' ) {
61
+ return 'unloadable'
62
+ }
63
63
}
64
+ return undefined
64
65
}
65
- return undefined
66
- } )
66
+ )
67
67
68
68
export const previewCandidatesLoading = computed ( $links , links => {
69
69
return Object . keys ( links ) . some ( url => links [ url ] ! . state === 'loading' )
Original file line number Diff line number Diff line change @@ -225,9 +225,9 @@ export function backToFirstStep(): void {
225
225
}
226
226
}
227
227
228
- export const backRoute = computed < Route | undefined , typeof router > (
228
+ export const backRoute = computed (
229
229
router ,
230
- ( { params, route } ) => {
230
+ ( { params, route } ) : Route | undefined => {
231
231
if ( route === 'add' && params . candidate ) {
232
232
return {
233
233
params : { url : params . url } ,
You can’t perform that action at this time.
0 commit comments