handle org.mozilla.rhino.NativeString as string in HopObject.put().
This commit is contained in:
parent
6109f475f0
commit
b67b75c3b4
1 changed files with 2 additions and 0 deletions
|
@ -468,6 +468,8 @@ public class HopObject extends ScriptableObject {
|
||||||
|
|
||||||
if ("Date".equals(s.getClassName())) {
|
if ("Date".equals(s.getClassName())) {
|
||||||
node.setDate(name, new Date((long) ScriptRuntime.toNumber(s)));
|
node.setDate(name, new Date((long) ScriptRuntime.toNumber(s)));
|
||||||
|
} else if ("String".equals(s.getClassName())) {
|
||||||
|
node.setString(name, ScriptRuntime.toString(s));
|
||||||
} else if (s instanceof MapWrapper) {
|
} else if (s instanceof MapWrapper) {
|
||||||
node.setJavaObject(name, ((MapWrapper) s).unwrap());
|
node.setJavaObject(name, ((MapWrapper) s).unwrap());
|
||||||
} else if (s instanceof HopObject) {
|
} else if (s instanceof HopObject) {
|
||||||
|
|
Loading…
Add table
Reference in a new issue