Skip to content

Commit e095037

Browse files
fix: remove warning about styles already being injected
1 parent d23da63 commit e095037

File tree

1 file changed

+1
-7
lines changed

1 file changed

+1
-7
lines changed

Diff for: src/utils/handle-style.ts

+1-7
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,7 @@ function injectStyle({
5252
const { insertAt } = ref
5353

5454
if (document.getElementById(id)) {
55-
// this should never happen because of `injected[type]`
56-
if (process.env.NODE_ENV !== 'production') {
57-
// eslint-disable-next-line no-console
58-
console.warn(
59-
`[react-tooltip] Element with id '${id}' already exists. Call \`removeStyle()\` first`,
60-
)
61-
}
55+
// this could happen in cases the tooltip is imported by multiple js modules
6256
return
6357
}
6458

0 commit comments

Comments
 (0)