Skip to content

Commit d2d6bfd

Browse files
danielbariongabrieljablonski
authored andcommitted
chore: bump version to 6.0.0 in order of beta releases
1 parent 305f536 commit d2d6bfd

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "react-tooltip",
3-
"version": "5.27.1",
3+
"version": "6.0.0",
44
"description": "react tooltip component",
55
"scripts": {
66
"dev-rollup": "node ./prebuild.js --env=development && node --max_old_space_size=2048 ./node_modules/rollup/dist/bin/rollup -c rollup.config.dev.mjs --watch",

src/components/TooltipController/TooltipController.tsx

+7-10
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,13 @@ const TooltipController = React.forwardRef<TooltipRefProps, ITooltipController>(
7070
const styleInjectionRef = useRef(disableStyleInjection)
7171

7272
const getDataAttributesFromAnchorElement = (elementReference: HTMLElement) => {
73-
const dataAttributes = elementReference?.getAttributeNames().reduce(
74-
(acc, name) => {
75-
if (name.startsWith('data-tooltip-')) {
76-
const parsedAttribute = name.replace(/^data-tooltip-/, '') as DataAttribute
77-
acc[parsedAttribute] = elementReference?.getAttribute(name) ?? null
78-
}
79-
return acc
80-
},
81-
{} as Record<DataAttribute, string | null>,
82-
)
73+
const dataAttributes = elementReference?.getAttributeNames().reduce((acc, name) => {
74+
if (name.startsWith('data-tooltip-')) {
75+
const parsedAttribute = name.replace(/^data-tooltip-/, '') as DataAttribute
76+
acc[parsedAttribute] = elementReference?.getAttribute(name) ?? null
77+
}
78+
return acc
79+
}, {} as Record<DataAttribute, string | null>)
8380

8481
return dataAttributes
8582
}

0 commit comments

Comments
 (0)