sprintify-ui 0.0.104 → 0.0.106

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "sprintify-ui",
3
- "version": "0.0.104",
3
+ "version": "0.0.106",
4
4
  "scripts": {
5
5
  "build": "rimraf dist && vue-tsc && vite build",
6
6
  "build-fast": "rimraf dist && vite build",
@@ -288,6 +288,12 @@ const route = useRoute();
288
288
  const router = useRouter();
289
289
  const routeName = route.name;
290
290
 
291
+ let willUnmount = false;
292
+
293
+ onBeforeUnmount(() => {
294
+ willUnmount = true;
295
+ });
296
+
291
297
  const width = ref(800);
292
298
  useResizeObserver(dataIteratorNode, () => {
293
299
  width.value = dataIteratorNode.value?.clientWidth ?? 800;
@@ -467,7 +473,9 @@ const onSearch = debounce((event: any) => {
467
473
  watch(
468
474
  () => route.query,
469
475
  () => {
470
- onRouteChange();
476
+ nextTick(() => {
477
+ onRouteChange();
478
+ });
471
479
  }
472
480
  );
473
481
 
@@ -487,6 +495,10 @@ function onRouteChange() {
487
495
  return;
488
496
  }
489
497
 
498
+ if (willUnmount) {
499
+ return;
500
+ }
501
+
490
502
  // Stop if route was changed
491
503
  if (route.name != routeName) {
492
504
  return;
@@ -528,6 +540,10 @@ function fetchWithoutLoading(force = false) {
528
540
  }
529
541
 
530
542
  function fetch(force = false, showLoading = true) {
543
+ if (willUnmount) {
544
+ return;
545
+ }
546
+
531
547
  const urlSplit = url.value.split(/[?#]/);
532
548
 
533
549
  const baseUrl = urlSplit[0];