Added test for undefined text

SVN revision: 1927
This commit is contained in:
Stefan Ritt 2007-09-28 13:22:06 +00:00
parent 9955b765fd
commit 8788270e06

View File

@ -1,5 +1,7 @@
function getSelection(text) function getSelection(text)
{ {
if (typeof text == 'undefined')
return "";
if (browser == 'MSIE') { if (browser == 'MSIE') {
sel = document.selection; sel = document.selection;
rng = sel.createRange(); rng = sel.createRange();