From 68f9a87ebae15cbe752b6575bead44a63f5d470e Mon Sep 17 00:00:00 2001 From: Ibrahim H Date: Wed, 21 Sep 2022 23:47:31 +0100 Subject: [PATCH] Fix: remove deprecation warning --- src/index.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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;