Fix bug when not doing cast - temp isn't defined.

This commit is contained in:
Bryce Curtis 2010-11-20 21:23:15 -06:00
parent 1c5aa6cd00
commit afc7e605ff

View File

@ -81,8 +81,11 @@ public class PluginResult {
StringBuffer buf = new StringBuffer("");
if (cast != null) {
buf.append("var temp = "+cast+"("+this.getJSONString() + ");\n");
buf.append("PhoneGap.callbackSuccess('"+callbackId+"',temp);");
}
else {
buf.append("PhoneGap.callbackSuccess('"+callbackId+"',"+this.getJSONString()+");");
}
buf.append("PhoneGap.callbackSuccess('"+callbackId+"', temp );");
return buf.toString();
}