mirror of
https://github.com/alextselegidis/plainpad.git
synced 2024-09-19 22:57:56 +03:00
Set the timeout prop to null cause clearTimeout won't reset it's value
This commit is contained in:
parent
a78514e22c
commit
610c218cf2
@ -68,6 +68,7 @@ class NotesStore {
|
||||
// Make sure unsaved changes are persisted before switching to the new note.
|
||||
if (this.timeout) {
|
||||
clearTimeout(this.timeout);
|
||||
this.timeout = null;
|
||||
await this.save();
|
||||
this.unlockPage();
|
||||
}
|
||||
@ -294,6 +295,7 @@ class NotesStore {
|
||||
|
||||
if (this.timeout) {
|
||||
clearTimeout(this.timeout);
|
||||
this.timeout = null;
|
||||
}
|
||||
|
||||
this.timeout = setTimeout(() => {
|
||||
@ -307,6 +309,7 @@ class NotesStore {
|
||||
|
||||
if (this.timeout) {
|
||||
clearTimeout(this.timeout);
|
||||
this.timeout = null;
|
||||
}
|
||||
|
||||
this.timeout = setTimeout(() => this.list(), 1000);
|
||||
|
Loading…
Reference in New Issue
Block a user