Solved! Go to Solution.
locateResult.title = addrCandidate.address ? replaceMuniCodes(String(addrCandidate.address)) : widgetTitle; function replaceMuniCodes(addStr:String):String { var retVal:String = addStr; var muniCodeArr:Array = addStr.split(", "); if(muniCodeArr.length == 4){ retVal = muniCodeArr[0] + ", "; switch(muniCodeArr[3]) { case "36201": { retVal += "West Goshen Township"; break; }; case "36203": { retVal += "East Goshen Township"; break; }; } } return retVal; }
Anthony
It is just checking if addrCandidate.address is null or not