diff --git a/src/index.js b/src/index.js index 0934726..0b0d5f6 100644 --- a/src/index.js +++ b/src/index.js @@ -11,11 +11,11 @@ import { createClient, createSecureClient, } from 'xmlrpc'; -import url from 'url'; +import { URL } from 'url'; class Odoo { constructor(config = {}) { - this.config = config; const urlparts = url.parse(config.url); + this.config = config; const urlparts = new URL(config.url); this.host = urlparts.hostname; this.port = config.port || urlparts.port; this.db = config.db;