Establish cM and consider in if statement

Avoids errors on content = cM.getValue line
This commit is contained in:
Matt Pass
2013-01-13 13:09:46 +00:00
parent c514e4a1ad
commit ca8e92e443

View File

@@ -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?