mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-07 23:03:11 +08:00
Fix bug when not doing cast - temp isn't defined.
This commit is contained in:
parent
1c5aa6cd00
commit
afc7e605ff
@ -81,8 +81,11 @@ public class PluginResult {
|
|||||||
StringBuffer buf = new StringBuffer("");
|
StringBuffer buf = new StringBuffer("");
|
||||||
if (cast != null) {
|
if (cast != null) {
|
||||||
buf.append("var temp = "+cast+"("+this.getJSONString() + ");\n");
|
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();
|
return buf.toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user