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.
pull/229/head
Wes Cossick 8 years ago
parent 0d9078c98d
commit 7aedb8623a

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

Loading…
Cancel
Save