Skip to content
This repository was archived by the owner on Nov 9, 2024. It is now read-only.

Commit 844d092

Browse files
committed
fix: add singleton check
1 parent a178944 commit 844d092

File tree

1 file changed

+12
-10
lines changed

1 file changed

+12
-10
lines changed

src/Tippy.js

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -54,16 +54,18 @@ export default function TippyGenerator(tippy) {
5454
const plugins = props.plugins || [];
5555

5656
if (render) {
57-
plugins.push({
58-
fn: () => ({
59-
onTrigger(_, event) {
60-
const {content} = singleton.data.children.find(
61-
({instance}) => instance.reference === event.currentTarget,
62-
);
63-
setSingletonContent(content);
64-
},
65-
}),
66-
});
57+
if (isSingletonMode) {
58+
plugins.push({
59+
fn: () => ({
60+
onTrigger(_, event) {
61+
const {content} = singleton.data.children.find(
62+
({instance}) => instance.reference === event.currentTarget,
63+
);
64+
setSingletonContent(content);
65+
},
66+
}),
67+
});
68+
}
6769

6870
computedProps = {
6971
...props,

0 commit comments

Comments
 (0)