From 8788270e0629451c6bbfeb4e32dcd9775d95af53 Mon Sep 17 00:00:00 2001 From: Stefan Ritt Date: Fri, 28 Sep 2007 13:22:06 +0000 Subject: [PATCH] Added test for undefined text SVN revision: 1927 --- scripts/elcode.js | 2 ++ 1 file changed, 2 insertions(+) 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();