File tree 4 files changed +20
-10
lines changed
4 files changed +20
-10
lines changed Original file line number Diff line number Diff line change @@ -574,7 +574,7 @@ export default {
574
574
}).catch (error => {
575
575
console .warn (" Error fetching mapping schemes:" , error)
576
576
this .concordances = []
577
- }).finally (() => {
577
+ }).then (() => {
578
578
// If there are no concordances, jump to second tab.
579
579
if (this .concordances .length == 0 && this .tab == 0 ) {
580
580
this .tab = 1
Original file line number Diff line number Diff line change @@ -1130,7 +1130,7 @@ export default {
1130
1130
1131
1131
}
1132
1132
1133
- Promise .all (promises).finally (() => {
1133
+ Promise .all (promises).then (() => {
1134
1134
if (this .loadingId == loadingId) {
1135
1135
// Reset loading ID
1136
1136
this .loading = 0
@@ -1225,7 +1225,9 @@ export default {
1225
1225
}
1226
1226
// Refresh list of mappings/suggestions.
1227
1227
this .$store .commit (" mapping/setRefresh" , { registry: _ .get (this .currentRegistry , " uri" ) })
1228
- }).finally (() => {
1228
+ }).catch (error => {
1229
+ console .error (" MappingBrowser - error in removeMapping:" , error)
1230
+ }).then (() => {
1229
1231
this .loadingGlobal = false
1230
1232
})
1231
1233
},
@@ -1275,7 +1277,9 @@ export default {
1275
1277
this .alert (message, null , " danger" )
1276
1278
}
1277
1279
return mapping
1278
- }).finally (() => {
1280
+ }).catch (error => {
1281
+ console .error (" MappingBrowser - error in saveMapping:" , error)
1282
+ }).then (() => {
1279
1283
this .loadingGlobal = false
1280
1284
// Refresh list of mappings/suggestions.
1281
1285
this .$store .commit (" mapping/setRefresh" , { registry: _ .get (this .currentRegistry , " uri" ) })
Original file line number Diff line number Diff line change @@ -440,7 +440,9 @@ export default {
440
440
if (this .clearOnSave ) {
441
441
this .clearMapping ()
442
442
}
443
- }).finally (() => {
443
+ }).catch (error => {
444
+ console .error (" MappingEditor - error in saveMapping:" , error)
445
+ }).then (() => {
444
446
this .loadingGlobal = false
445
447
this .$store .commit (" mapping/setRefresh" , { registry: _ .get (this .$store .getters .getCurrentRegistry , " uri" ) })
446
448
})
@@ -477,7 +479,9 @@ export default {
477
479
} else {
478
480
this .alert (this .$t (" alerts.mappingNotDeleted" ), null , " danger" )
479
481
}
480
- }).finally (() => {
482
+ }).catch (error => {
483
+ console .error (" MappingEditor - error in deleteOriginalMapping:" , error)
484
+ }).then (() => {
481
485
this .loadingGlobal = false
482
486
})
483
487
return true
Original file line number Diff line number Diff line change @@ -165,9 +165,10 @@ class LocalMappingsProvider extends BaseProvider {
165
165
localMappings = localMappings . map ( mapping => jskos . minifyMapping ( mapping ) )
166
166
return localforage . setItem ( this . localStorageKey , localMappings ) . then ( ( ) => {
167
167
return mapping
168
- } ) . catch ( ( ) => {
168
+ } ) . catch ( error => {
169
+ console . error ( "local-mappings - error in saveMapping:" , error )
169
170
return null
170
- } ) . finally ( mapping => {
171
+ } ) . then ( mapping => {
171
172
done ( )
172
173
return mapping
173
174
} )
@@ -193,9 +194,10 @@ class LocalMappingsProvider extends BaseProvider {
193
194
localMappings = localMappings . map ( mapping => jskos . minifyMapping ( mapping ) )
194
195
return localforage . setItem ( this . localStorageKey , localMappings ) . then ( ( ) => {
195
196
return mapping
196
- } ) . catch ( ( ) => {
197
+ } ) . catch ( error => {
198
+ console . error ( "local-mappings - error in removeMapping:" , error )
197
199
return null
198
- } ) . finally ( mapping => {
200
+ } ) . then ( mapping => {
199
201
done ( )
200
202
return mapping
201
203
} )
You can’t perform that action at this time.
0 commit comments