Browse Source

fix: use window clearTimeout (#3716)

pull/3725/head
ajuner 4 years ago committed by GitHub
parent
commit
f589c8f723
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 4
      components/vc-select/generate.tsx

4
components/vc-select/generate.tsx

@ -911,11 +911,11 @@ export default function generateSelector<
const activeTimeoutIds: number[] = [];
onMounted(() => {
activeTimeoutIds.forEach(timeoutId => clearTimeout(timeoutId));
activeTimeoutIds.forEach(timeoutId => window.clearTimeout(timeoutId));
activeTimeoutIds.splice(0, activeTimeoutIds.length);
});
onBeforeUnmount(() => {
activeTimeoutIds.forEach(timeoutId => clearTimeout(timeoutId));
activeTimeoutIds.forEach(timeoutId => window.clearTimeout(timeoutId));
activeTimeoutIds.splice(0, activeTimeoutIds.length);
});

Loading…
Cancel
Save