Skip to content

Commit 796a615

Browse files
committed
remove parens added by my prettier
1 parent 28b1b18 commit 796a615

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

src/index.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ class ReactTooltip extends React.Component {
136136
* For unify the bind and unbind listener
137137
*/
138138
bind(methodArray) {
139-
methodArray.forEach((method) => {
139+
methodArray.forEach(method => {
140140
this[method] = this[method].bind(this);
141141
});
142142
}
@@ -152,7 +152,7 @@ class ReactTooltip extends React.Component {
152152
static getDerivedStateFromProps(nextProps, prevState) {
153153
const { ariaProps } = prevState;
154154
const newAriaProps = parseAria(nextProps);
155-
const isChanged = Object.keys(newAriaProps).some((props) => {
155+
const isChanged = Object.keys(newAriaProps).some(props => {
156156
return newAriaProps[props] !== ariaProps[props];
157157
});
158158
if (!isChanged) {
@@ -247,8 +247,8 @@ class ReactTooltip extends React.Component {
247247

248248
// Scan document for shadow DOM elements
249249
nodeListToArray(document.getElementsByTagName('*'))
250-
.filter((element) => element.shadowRoot)
251-
.forEach((element) => {
250+
.filter(element => element.shadowRoot)
251+
.forEach(element => {
252252
targetArray = targetArray.concat(
253253
nodeListToArray(element.shadowRoot.querySelectorAll(selector))
254254
);
@@ -266,7 +266,7 @@ class ReactTooltip extends React.Component {
266266
const { id, globalEventOff, isCapture } = this.props;
267267
const targetArray = this.getTargetArray(id);
268268

269-
targetArray.forEach((target) => {
269+
targetArray.forEach(target => {
270270
if (target.getAttribute('currentItem') === null) {
271271
target.setAttribute('currentItem', 'false');
272272
}
@@ -279,7 +279,7 @@ class ReactTooltip extends React.Component {
279279
if (this.isBodyMode()) {
280280
this.bindBodyListener(targetArray);
281281
} else {
282-
targetArray.forEach((target) => {
282+
targetArray.forEach(target => {
283283
const isCaptureMode = this.isCapture(target);
284284
const effect = this.getEffect(target);
285285
if (this.isCustomEvent(target)) {
@@ -320,7 +320,7 @@ class ReactTooltip extends React.Component {
320320
this.unbindBodyListener();
321321
} else {
322322
const targetArray = this.getTargetArray(id);
323-
targetArray.forEach((target) => {
323+
targetArray.forEach(target => {
324324
this.unbindBasicListener(target);
325325
if (this.isCustomEvent(target)) this.customUnbindListener(target);
326326
});
@@ -382,7 +382,7 @@ class ReactTooltip extends React.Component {
382382
if (isGlobalCall) {
383383
// Don't trigger other elements belongs to other ReactTooltip
384384
const targetArray = this.getTargetArray(this.props.id);
385-
const isMyElement = targetArray.some((ele) => ele === e.currentTarget);
385+
const isMyElement = targetArray.some(ele => ele === e.currentTarget);
386386
if (!isMyElement) return;
387387
}
388388
// Get the tooltip content
@@ -624,7 +624,7 @@ class ReactTooltip extends React.Component {
624624
if (hasTarget) {
625625
// Don't trigger other elements belongs to other ReactTooltip
626626
const targetArray = this.getTargetArray(this.props.id);
627-
const isMyElement = targetArray.some((ele) => ele === e.currentTarget);
627+
const isMyElement = targetArray.some(ele => ele === e.currentTarget);
628628
if (!isMyElement || !this.state.show) return;
629629
}
630630

@@ -742,7 +742,7 @@ class ReactTooltip extends React.Component {
742742
hasCustomColors() {
743743
return Boolean(
744744
Object.keys(this.state.customColors).find(
745-
(color) => color !== 'border' && this.state.customColors[color]
745+
color => color !== 'border' && this.state.customColors[color]
746746
) ||
747747
(this.state.border && this.state.customColors['border'])
748748
);
@@ -786,7 +786,7 @@ class ReactTooltip extends React.Component {
786786
<Wrapper
787787
className={`${wrapperClassName}`}
788788
id={this.props.id || uuid}
789-
ref={(ref) => (this.tooltipRef = ref)}
789+
ref={ref => (this.tooltipRef = ref)}
790790
{...ariaProps}
791791
data-id="tooltip"
792792
dangerouslySetInnerHTML={{ __html: htmlContent }}
@@ -798,7 +798,7 @@ class ReactTooltip extends React.Component {
798798
className={`${wrapperClassName}`}
799799
id={this.props.id || uuid}
800800
{...ariaProps}
801-
ref={(ref) => (this.tooltipRef = ref)}
801+
ref={ref => (this.tooltipRef = ref)}
802802
data-id="tooltip"
803803
>
804804
<style dangerouslySetInnerHTML={{ __html: style }} />

0 commit comments

Comments
 (0)