1
0
mirror of https://github.com/flarum/core.git synced 2025-07-17 14:51:19 +02:00

Fix formatting error in Tooltip.tsx

Prettier is acting differently on different systems.
This commit is contained in:
David Wheatley
2021-05-12 23:14:50 +01:00
parent f1e8821b70
commit fa8812a5d4

View File

@@ -233,9 +233,8 @@ export default class Tooltip extends Component<TooltipAttrs> {
text, text,
} = this.attrs; } = this.attrs;
const trigger = (typeof tooltipVisible === 'boolean' // Fancy "hack" to assemble the trigger string
? 'manual' const trigger = typeof tooltipVisible === 'boolean' ? 'manual' : classList('hover', [showOnFocus && 'focus']);
: classList('hover', [showOnFocus && 'focus'])) as TooltipCreationOptions['trigger'];
const realText = this.getRealText(); const realText = this.getRealText();
this.childDomNode.setAttribute('title', realText); this.childDomNode.setAttribute('title', realText);
@@ -247,7 +246,6 @@ export default class Tooltip extends Component<TooltipAttrs> {
html, html,
delay, delay,
placement: position, placement: position,
// Fancy "hack" to assemble the trigger string
trigger, trigger,
}, },
// @ts-expect-error We don't want this arg to be part of the public API. It only exists to prevent deprecation warnings when using `$.tooltip` in this component. // @ts-expect-error We don't want this arg to be part of the public API. It only exists to prevent deprecation warnings when using `$.tooltip` in this component.