diff --git a/scripts/elcode.js b/scripts/elcode.js index 6091236c..8ea5d1b8 100755 --- a/scripts/elcode.js +++ b/scripts/elcode.js @@ -1,5 +1,7 @@ function getSelection(text) { + if (typeof text == 'undefined') + return ""; if (browser == 'MSIE') { sel = document.selection; rng = sel.createRange();