[FIX] py.js: arguments dispatching in PY_call
When providing an args of ``null`` (or ``undefined``) and a non-empty kwargs, the kwargs would be removed/ignored. While explicitly providing a null args is not necessary, it's perfectly valid.
This commit is contained in:
parent
eb9c8912a9
commit
752e21a633
|
@ -547,11 +547,13 @@ var py = {};
|
|||
};
|
||||
py.PY_call = function (callable, args, kwargs) {
|
||||
if (!args) {
|
||||
args = []; kwargs = {};
|
||||
} else if (typeof args === 'object' && !(args instanceof Array)) {
|
||||
args = [];
|
||||
}
|
||||
if (typeof args === 'object' && !(args instanceof Array)) {
|
||||
kwargs = args;
|
||||
args = [];
|
||||
} else if (!kwargs) {
|
||||
}
|
||||
if (!kwargs) {
|
||||
kwargs = {};
|
||||
}
|
||||
if (callable.__is_type) {
|
||||
|
|
Loading…
Reference in New Issue