2
0
mirror of https://github.com/Ionaru/easy-markdown-editor synced 2025-07-02 23:54:28 -06:00

Fix bug creating icons

This commit is contained in:
Wes Cossick 2015-07-14 11:54:40 -05:00
parent d05106a0ed
commit 096f6e9a6d

View File

@ -28,7 +28,7 @@ function fixShortcut(name) {
/**
* Create icon element for toolbar.
*/
function createIcon(name, options, enableTooltips) {
function createIcon(options, enableTooltips) {
options = options || {};
var el = document.createElement('a');
enableTooltips = (enableTooltips == undefined) ? true : enableTooltips;
@ -603,12 +603,10 @@ SimpleMDE.prototype.createToolbar = function(items) {
for (var i = 0; i < items.length; i++) {
(function(item) {
var el;
if (item.name) {
el = createIcon(item.name, item, self.options.toolbarTips);
} else if (item === '|') {
if (item === '|') {
el = createSep();
} else {
el = createIcon(item);
el = createIcon(item, self.options.toolbarTips);
}
// bind events, special for info