mirror of
https://github.com/carbon-design-system/carbon-components-svelte.git
synced 2025-09-16 02:41:05 +00:00
refactor(timeout): move setTimeout to afterUpdate method
This commit is contained in:
parent
7a612e60cf
commit
2cac297abf
3 changed files with 23 additions and 22 deletions
|
@ -11,10 +11,8 @@
|
|||
let timeoutId = undefined;
|
||||
|
||||
onDestroy(() => {
|
||||
if (timeoutId !== undefined) {
|
||||
window.clearTimeout(timeoutId);
|
||||
timeoutId = undefined;
|
||||
}
|
||||
window.clearTimeout(timeoutId);
|
||||
timeoutId = undefined;
|
||||
});
|
||||
|
||||
$: showFeedback = timeoutId !== undefined;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue