Commit bedf3f8 pompurin404
committed
1 parent 71bb2c5 commit bedf3f8 Copy full SHA for bedf3f8
File tree 2 files changed +3
-2
lines changed
2 files changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -55,13 +55,12 @@ export async function updateProfileItem(item: IProfileItem): Promise<void> {
55
55
}
56
56
config . items [ index ] = item
57
57
await setProfileConfig ( config )
58
- await addProfileUpdater ( item )
59
58
}
60
59
61
60
export async function addProfileItem ( item : Partial < IProfileItem > ) : Promise < void > {
62
61
const newItem = await createProfile ( item )
63
62
const config = await getProfileConfig ( )
64
- if ( await getProfileItem ( item . id ) ) {
63
+ if ( await getProfileItem ( newItem . id ) ) {
65
64
await updateProfileItem ( newItem )
66
65
} else {
67
66
config . items . push ( newItem )
Original file line number Diff line number Diff line change @@ -35,6 +35,8 @@ const Profiles: React.FC = () => {
35
35
setImporting ( true )
36
36
try {
37
37
await addProfileItem ( { name : '' , type : 'remote' , url } )
38
+ } catch ( e ) {
39
+ alert ( e )
38
40
} finally {
39
41
setImporting ( false )
40
42
}
You can’t perform that action at this time.
0 commit comments