- replyResult() has a optional parameter as array type.
previous _toPlatformObject() can't handle this case.
- removed lint error
[verification] self test
Change-Id: I970a47447bc7571ba8cee7741d69e7d247682ccb
Signed-off-by: Sunggyu Choi <sunggyu.choi@samsung.com>
};
function _toPlatformObject(val, types) {
+ var v;
var t;
+ if (_type.isArray(val)) {
+ v = val;
+ } else {
+ v = [val];
+ }
+
if (_type.isArray(types)) {
t = types;
} else {
}
var match = false;
for (var i = 0; i < t.length; ++i) {
- match = match || (val instanceof t[i]);
+ for (var j = 0; j < v.length; ++j) {
+ match = match || (v[j] instanceof t[i]);
+ }
}
if (match) {
return val;