diff --git a/unitool.js b/unitool.js index 88bf377..7cff2b5 100644 --- a/unitool.js +++ b/unitool.js @@ -111,7 +111,7 @@ export default { make_server_url (route) { if (typeof route === 'string') route = route.replace('\\', '/') - else if (typeof route === 'object') { + else if (route?.apiWho && route?.apiTodo) { const { apiVersion = 'api', apiWho, apiTodo } = route route = `${apiVersion}/${apiWho}/${apiTodo}` } else {