fix: Update useDestroyed.ts (#5361)

destroyed should be true not false
pull/5362/head
ysex 3 years ago committed by GitHub
parent d1e2f4ff27
commit cc47bb66ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -1,12 +1,12 @@
import { onBeforeUnmount, ref } from 'vue'; import { onBeforeUnmount, ref } from 'vue';
const useDestroyed = () => { const useDestroyed = () => {
const mounted = ref(true); const destroyed = ref(false);
onBeforeUnmount(() => { onBeforeUnmount(() => {
mounted.value = false; destroyed.value = true;
}); });
return mounted; return destroyed;
}; };
export default useDestroyed; export default useDestroyed;

Loading…
Cancel
Save