From 185634977ac9c602d7f82b727abbc3c3f19a42cc Mon Sep 17 00:00:00 2001 From: Wayne Ellis Date: Sun, 14 Sep 2014 14:00:00 +0100 Subject: [PATCH] Bug Fix: some scenarios where buttons not displaying --- lib/codemwnci/markdown-editpreview-ng.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/codemwnci/markdown-editpreview-ng.js b/lib/codemwnci/markdown-editpreview-ng.js index c473f8d..677c7ab 100644 --- a/lib/codemwnci/markdown-editpreview-ng.js +++ b/lib/codemwnci/markdown-editpreview-ng.js @@ -47,7 +47,7 @@ restrict: 'A', replace: false, link: function(scope, element, attrs) { - var hiddenButtons = attrs.markdownHiddenButtons.split(","); + var hiddenButtons = attrs.markdownHiddenButtons ? attrs.markdownHiddenButtons.split(",") : new Array(); hiddenButtons.push('cmdPreview'); element.markdown({hiddenButtons: hiddenButtons}); },