Skip to content

Commit

Permalink
fix: remove warning about styles already being injected
Browse files Browse the repository at this point in the history
  • Loading branch information
gabrieljablonski committed Jul 3, 2024
1 parent d23da63 commit 329f432
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/utils/handle-style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 329f432

Please sign in to comment.