Skip to content

Commit

Permalink
Move eslint-disable comment to the correct deps array (#43320)
Browse files Browse the repository at this point in the history
  • Loading branch information
ciampo authored Aug 17, 2022
1 parent daf1379 commit e3ff8b7
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/components/src/popover/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -187,10 +187,6 @@ const Popover = (
}

return documentToReturn ?? document;

// 'reference' and 'refs.floating' are refs and don't need to be listed
// as dependencies (see https://github.com/WordPress/gutenberg/pull/41612)
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [ anchorRef, anchorRect, getAnchorRect ] );

/**
Expand Down Expand Up @@ -372,6 +368,9 @@ const Popover = (
refs.floating.current,
update
);
// 'reference' and 'refs.floating' are refs and don't need to be listed
// as dependencies (see https://github.com/WordPress/gutenberg/pull/41612)
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [ anchorRef, anchorRect, getAnchorRect, update ] );

// This is only needed for a smooth transition when moving blocks.
Expand Down

0 comments on commit e3ff8b7

Please sign in to comment.