Skip to content

Commit cc47bb6

Browse files
authored
fix: Update useDestroyed.ts (#5361)
destroyed should be true not false
1 parent d1e2f4f commit cc47bb6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed
+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
import { onBeforeUnmount, ref } from 'vue';
22

33
const useDestroyed = () => {
4-
const mounted = ref(true);
4+
const destroyed = ref(false);
55
onBeforeUnmount(() => {
6-
mounted.value = false;
6+
destroyed.value = true;
77
});
88

9-
return mounted;
9+
return destroyed;
1010
};
1111

1212
export default useDestroyed;

0 commit comments

Comments
 (0)