Skip to content

Commit

Permalink
Post Date block: use new anchor prop for Popover (#43787)
Browse files Browse the repository at this point in the history
* Post Date block: use new `anchor` prop for `Popover`

* Prevent anchor value from being `null`
  • Loading branch information
ciampo authored Sep 5, 2022
1 parent ace13bf commit 884ff06
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/block-library/src/post-date/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,10 @@ export default function PostDateEdit( {
{ date && ! isDescendentOfQueryLoop && (
<ToolbarGroup>
<Dropdown
popoverProps={ { anchorRef: timeRef.current } }
popoverProps={ {
// `anchor` should never be `null`
anchor: timeRef.current ?? undefined,
} }
renderContent={ ( { onClose } ) => (
<PublishDateTimePicker
currentDate={ date }
Expand Down

0 comments on commit 884ff06

Please sign in to comment.