2
0
mirror of https://github.com/Ionaru/easy-markdown-editor synced 2025-06-29 06:01:01 -06:00

Fix options undefined bug when clearing autosave value

Occurred when the autosave option was not present and a user tried to clear the autosaved value.
This commit is contained in:
Wes Cossick 2016-01-13 00:46:35 -06:00
parent 0d9078c98d
commit 7aedb8623a

View File

@ -1233,8 +1233,8 @@ SimpleMDE.prototype.autosave = function() {
SimpleMDE.prototype.clearAutosavedValue = function() { SimpleMDE.prototype.clearAutosavedValue = function() {
if(localStorage) { if(localStorage) {
if(this.options.autosave.uniqueId == undefined || this.options.autosave.uniqueId == "") { if(this.options.autosave == undefined || this.options.autosave.uniqueId == undefined || this.options.autosave.uniqueId == "") {
console.log("SimpleMDE: You must set a uniqueId to use the autosave feature"); console.log("SimpleMDE: You must set a uniqueId to clear the autosave value");
return; return;
} }