From 76e73edbcd75ff1195246b8f47757d3708818761 Mon Sep 17 00:00:00 2001 From: Adam Alsabery Date: Wed, 13 May 2020 08:16:07 -0700 Subject: [PATCH] fix(utils): use removeChild() instead of remove() --- package.json | 2 +- src/utils.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 1fdbbfc..22c5614 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "react-range", - "version": "1.6.2", + "version": "1.6.3", "description": "Range input. Slides in all directions.", "main": "lib/index.js", "types": "lib/index.d.ts", diff --git a/src/utils.ts b/src/utils.ts index 9793959..b6f2e67 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -202,7 +202,7 @@ const getThumbWidth = ( elClone.style.visibility = 'hidden'; document.body.appendChild(elClone); elWidth = Math.ceil(elClone.getBoundingClientRect().width); - elClone.remove(); + document.body.removeChild(elClone); } return elWidth > width ? elWidth : width; },