diff --git a/addons/web/static/lib/py.js/lib/py.js b/addons/web/static/lib/py.js/lib/py.js index 2c738dc95d1..ed5657c8f3b 100644 --- a/addons/web/static/lib/py.js/lib/py.js +++ b/addons/web/static/lib/py.js/lib/py.js @@ -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) {