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';
const useDestroyed = () => {
const mounted = ref(true);
const destroyed = ref(false);
onBeforeUnmount(() => {
mounted.value = false;
destroyed.value = true;
});
return mounted;
return destroyed;
};
export default useDestroyed;

Loading…
Cancel
Save