From 2745b03b7167534ab758205f9e47db8fe0fef73a Mon Sep 17 00:00:00 2001 From: Ivan Borshchov Date: Thu, 10 Sep 2020 13:32:56 +0300 Subject: [PATCH] move line to another section ,rollback unneded change --- README.md | 4 ++-- src/js/easymde.js | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c24f7d3..4af2687 100644 --- a/README.md +++ b/README.md @@ -73,8 +73,6 @@ var easyMDE = new EasyMDE(); ``` -If you need to remove installed listeners (when editor not needed anymore), call `easyMDE.cleanup()` - Alternatively you can select a specific TextArea, via Javascript: ```html @@ -474,6 +472,8 @@ easyMDE.toTextArea(); easyMDE = null; ``` +If you need to remove installed listeners (when editor not needed anymore), call `easyMDE.cleanup()` + ### Useful methods diff --git a/src/js/easymde.js b/src/js/easymde.js index 41bdb7e..f04076a 100644 --- a/src/js/easymde.js +++ b/src/js/easymde.js @@ -2049,8 +2049,7 @@ EasyMDE.prototype.render = function (el) { if (options.status !== false) { this.gui.statusbar = this.createStatusbar(); } - var autosaveEnabled = options.autosave != undefined && options.autosave.enabled === true; - if (autosaveEnabled) { + if (options.autosave != undefined && options.autosave.enabled === true) { this.autosave(); // use to load localstorage content this.codemirror.on('change', function () { clearTimeout(self._autosave_timeout);