mirror of
https://github.com/Ionaru/easy-markdown-editor
synced 2025-07-03 08:04:29 -06:00
Early exit from updateStatusBar if no status bar is available
This commit is contained in:
parent
754bdc3ab2
commit
11d210545b
@ -1849,6 +1849,10 @@ EasyMDE.prototype.uploadImagesUsingCustomFunction = function (imageUploadFunctio
|
|||||||
* @param content {string} the new content of the item to write in the status bar.
|
* @param content {string} the new content of the item to write in the status bar.
|
||||||
*/
|
*/
|
||||||
EasyMDE.prototype.updateStatusBar = function (itemName, content) {
|
EasyMDE.prototype.updateStatusBar = function (itemName, content) {
|
||||||
|
if (!this.gui.statusbar) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
var matchingClasses = this.gui.statusbar.getElementsByClassName(itemName);
|
var matchingClasses = this.gui.statusbar.getElementsByClassName(itemName);
|
||||||
if (matchingClasses.length === 1) {
|
if (matchingClasses.length === 1) {
|
||||||
this.gui.statusbar.getElementsByClassName(itemName)[0].textContent = content;
|
this.gui.statusbar.getElementsByClassName(itemName)[0].textContent = content;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user