mirror of
https://github.com/sparksuite/simplemde-markdown-editor.git
synced 2025-09-24 16:40:55 -06:00
Fix autosave
wrong comparison in localstorage, empty string not equal null ``` line 867 localStorage.setItem(simplemde.options.autosave.unique_id, ""); line 874 localStorage.getItem(this.options.autosave.unique_id) != null ```
This commit is contained in:
parent
4240da87c0
commit
0ca002bd66
@ -871,7 +871,7 @@ SimpleMDE.prototype.autosave = function() {
|
||||
}
|
||||
|
||||
if(this.options.autosave.loaded !== true) {
|
||||
if(localStorage.getItem(this.options.autosave.unique_id) != null)
|
||||
if(localStorage.getItem(this.options.autosave.unique_id) != "")
|
||||
this.codemirror.setValue(localStorage.getItem(this.options.autosave.unique_id));
|
||||
|
||||
this.options.autosave.loaded = true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user