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:
arduanov 2015-09-14 03:34:56 +05:00
parent 4240da87c0
commit 0ca002bd66

View File

@ -871,7 +871,7 @@ SimpleMDE.prototype.autosave = function() {
} }
if(this.options.autosave.loaded !== true) { 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.codemirror.setValue(localStorage.getItem(this.options.autosave.unique_id));
this.options.autosave.loaded = true; this.options.autosave.loaded = true;