Skip to content
Browse files

targetOffsets as any

src/positioning/modifiers/arrow.ts (Line 25)
    (targetOffsets as any)[side] -=
Property '(targetOffsets as any)[side]' is used on both the left and right sides of this compound assignment. Consider using non-compound assignment instead.
A reference is used on both sides of compound assignment operator
This rule applies when a reference is used on both sides of compound assignment operator.

If there is a same reference on both sides of compound assignment operator, the compound operator applies to the reference itself.

It may be typo or intention. But it is recommended to use clearer and shorter code
  • Loading branch information...
chawdamrunal committed Oct 8, 2019
1 parent b0a448b commit fe8bc0b41fdb1d9fd2dbc31187cf7383b821620a
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/positioning/modifiers/arrow.ts
@@ -22,7 +22,7 @@ export function arrow(data: Data) {

// top/left side
if ([opSide] - arrowElementSize < (targetOffsets as any)[side]) {
(targetOffsets as any)[side] -=
(targetOffsets as any)[side]-=
(targetOffsets as any)[side] - ([opSide] - arrowElementSize);
// bottom/right side

0 comments on commit fe8bc0b

Please sign in to comment.
You can’t perform that action at this time.