From e09503760bc103e476b803a7463eb91e3c7d1a8f Mon Sep 17 00:00:00 2001 From: gabrieljablonski Date: Tue, 2 Jul 2024 09:27:17 -0300 Subject: [PATCH] fix: remove warning about styles already being injected --- src/utils/handle-style.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/src/utils/handle-style.ts b/src/utils/handle-style.ts index 8b22d177..77570a6a 100644 --- a/src/utils/handle-style.ts +++ b/src/utils/handle-style.ts @@ -52,13 +52,7 @@ function injectStyle({ const { insertAt } = ref if (document.getElementById(id)) { - // this should never happen because of `injected[type]` - if (process.env.NODE_ENV !== 'production') { - // eslint-disable-next-line no-console - console.warn( - `[react-tooltip] Element with id '${id}' already exists. Call \`removeStyle()\` first`, - ) - } + // this could happen in cases the tooltip is imported by multiple js modules return }