This commit is contained in:
Andrea Alberti 2024-09-15 11:02:56 +02:00
parent 310fe32c2b
commit 56de2c7d4b
2 changed files with 1 additions and 2 deletions

View file

@ -57,7 +57,6 @@ export default class PluginsAnnotations extends Plugin {
constructor(app:App, manifest:PluginManifest) {
super(app, manifest);
// Set up debounced saving functions
const timeout_debounced_saving_ms = 100;
const { debouncedFct, waitFnc } = debounceFactoryWithWaitMechanism(

View file

@ -149,7 +149,7 @@ export function debounceFactoryWithWaitMechanism<F extends (...args: never[]) =>
promise = new Promise<void>((resolve, reject) => {
// Set the new resolvePromise function
resolvePromise = () => {
resolve(); // Resolve to indicate that the previous execution was cancelled
resolve(); // Reference to resolve() used when the previous execution is cancelled
};
// Schedule the function to run after the debounce delay