diff --git a/lib/ice-coder.js b/lib/ice-coder.js index 2080fa2..378b608 100644 --- a/lib/ice-coder.js +++ b/lib/ice-coder.js @@ -808,8 +808,8 @@ var ICEcoder = { results = top.document.getElementById('results'); // If we have something to find in currrent document - if (find.length>0 && document.findAndReplace.target.value=="this document") { - cM = ICEcoder.getcMInstance(); + cM = ICEcoder.getcMInstance(); + if (cM && find.length>0 && document.findAndReplace.target.value=="this document") { content = cM.getValue().toLowerCase(); // Find & replace the next instance, or all?