mirror of
https://github.com/dbgate/dbgate
synced 2024-11-07 20:26:23 +00:00
fix
This commit is contained in:
parent
20fccf51d9
commit
153a4bca42
@ -21,17 +21,19 @@ export default function createActivator(name: string, activateOnTabVisible: bool
|
||||
let tabVisibleValue;
|
||||
|
||||
onMount(() => {
|
||||
const unsubscribeTabVisible = tabVisible.subscribe(value => {
|
||||
tabVisibleValue = value;
|
||||
if (activateOnTabVisible) {
|
||||
activate();
|
||||
}
|
||||
});
|
||||
invalidateCommands();
|
||||
if (tabVisible) {
|
||||
const unsubscribeTabVisible = tabVisible.subscribe(value => {
|
||||
tabVisibleValue = value;
|
||||
if (activateOnTabVisible) {
|
||||
activate();
|
||||
}
|
||||
});
|
||||
invalidateCommands();
|
||||
|
||||
return () => {
|
||||
unsubscribeTabVisible();
|
||||
};
|
||||
return () => {
|
||||
unsubscribeTabVisible();
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
const activate = () => {
|
||||
|
Loading…
Reference in New Issue
Block a user