Skip to content

Commit

Permalink
Merge pull request #67 from GuriK/patch-1
Browse files Browse the repository at this point in the history
Fixed JS error if 'createlink' is not enabled
  • Loading branch information
sofish committed Oct 27, 2013
2 parents ab9a4ab + 291ad01 commit fd48629
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/pen.js
Original file line number Diff line number Diff line change
Expand Up @@ -216,15 +216,18 @@
var node = this._sel.focusNode
, effects = this._effectNode(node)
, menu = this._menu
, highlight;
, highlight
, linkInput = menu.querySelector('input');

// remove all highlights
[].slice.call(menu.querySelectorAll('.active')).forEach(function(el) {
el.classList.remove('active');
});

// display link input
menu.querySelector('input').style.display = 'none';
// display link input if createlink enabled
if (linkInput) {
linkInput.style.display = 'none';
}

highlight = function(str) {
var selector = '.icon-' + str
Expand Down

0 comments on commit fd48629

Please sign in to comment.