File tree Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Expand file tree Collapse file tree 2 files changed +10
-1
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ export {}
88declare module 'vue' {
99 export interface GlobalComponents {
1010 DynamicLegends : typeof import ( './components/legends/DynamicLegends.vue' ) [ 'default' ]
11+ ElAutocomplete : typeof import ( 'element-plus/es' ) [ 'ElAutocomplete' ]
1112 ElButton : typeof import ( 'element-plus/es' ) [ 'ElButton' ]
1213 ElCheckbox : typeof import ( 'element-plus/es' ) [ 'ElCheckbox' ]
1314 ElCheckboxGroup : typeof import ( 'element-plus/es' ) [ 'ElCheckboxGroup' ]
@@ -24,6 +25,7 @@ declare module 'vue' {
2425 ElRadioGroup : typeof import ( 'element-plus/es' ) [ 'ElRadioGroup' ]
2526 ElRow : typeof import ( 'element-plus/es' ) [ 'ElRow' ]
2627 ElSelect : typeof import ( 'element-plus/es' ) [ 'ElSelect' ]
28+ ElSwitch : typeof import ( 'element-plus/es' ) [ 'ElSwitch' ]
2729 FlatmapError : typeof import ( './components/FlatmapError.vue' ) [ 'default' ]
2830 FlatmapVuer : typeof import ( './components/FlatmapVuer.vue' ) [ 'default' ]
2931 LegendItem : typeof import ( './components/legends/LegendItem.vue' ) [ 'default' ]
Original file line number Diff line number Diff line change @@ -166,7 +166,11 @@ export default {
166166 if (this .requireInitialisation ) {
167167 // It has not been initialised yet
168168 this .requireInitialisation = false
169- fetch (this .flatmapAPI )
169+ const controller = new AbortController ();
170+ const signal = controller .signal ;
171+ const timeoutId = setTimeout (() => controller .abort (), 5000 );
172+
173+ fetch (this .flatmapAPI , {signal})
170174 .then ((response ) => {
171175 if (! response .ok ) {
172176 // HTTP-level errors
@@ -278,6 +282,9 @@ export default {
278282 other ()
279283 })
280284 })
285+ .finally (() => {
286+ clearTimeout (timeoutId);
287+ });
281288 } else if (this .initialised ) {
282289 // resolve as it has been initialised
283290 resolve ()
You can’t perform that action at this time.
0 commit comments