Skip to content

Commit

Permalink
Fix memory leak issue
Browse files Browse the repository at this point in the history
  • Loading branch information
emargareten committed Mar 7, 2024
1 parent 7f16c7e commit f3d3e93
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion dist/inertia-modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,8 @@ const plugin = {
},
};

const modal = computed(() => usePage()?.props?.modal);
const page = usePage();
const modal = computed(() => page?.props?.modal);
const props = computed(() => modal.value?.props);
const key = computed(() => modal.value?.key);

Expand Down
3 changes: 2 additions & 1 deletion dist/inertia-modal.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@
},
};

const modal = vue.computed(() => vue3.usePage()?.props?.modal);
const page = vue3.usePage();
const modal = vue.computed(() => page?.props?.modal);
const props = vue.computed(() => modal.value?.props);
const key = vue.computed(() => modal.value?.key);

Expand Down
3 changes: 2 additions & 1 deletion js/useModal.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ import { router, usePage } from '@inertiajs/vue3'
import { defineAsyncComponent, h, nextTick, watch, computed, ref, shallowRef } from 'vue'
import resolver from './resolver'

const modal = computed(() => usePage()?.props?.modal);
const page = usePage()
const modal = computed(() => page?.props?.modal);
const props = computed(() => modal.value?.props)
const key = computed(() => modal.value?.key)

Expand Down

0 comments on commit f3d3e93

Please sign in to comment.