Skip to content

Commit

Permalink
Remove default value for __unstableForcePosition, and ensure deprecat…
Browse files Browse the repository at this point in the history
…ion message is shown whenever the prop is explicitly specified
  • Loading branch information
talldan committed Aug 30, 2022
1 parent 811c026 commit 13d941a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/components/src/popover/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ const Popover = (
flip = true,
resize = true,
__unstableShift = false,
__unstableForcePosition = false,
__unstableForcePosition,
...contentProps
},
forwardedRef
Expand All @@ -158,7 +158,7 @@ const Popover = (
} );
}

if ( __unstableForcePosition ) {
if ( __unstableForcePosition !== undefined ) {
deprecated( '__unstableForcePosition prop in Popover component', {
since: '6.1',
version: '6.3',
Expand All @@ -167,8 +167,8 @@ const Popover = (

// Back-compat, set the `flip` and `resize` props
// to `false` to replicate `__unstableForcePosition`.
flip = false;
resize = false;
flip = ! __unstableForcePosition;
resize = ! __unstableForcePosition;
}

const arrowRef = useRef( null );
Expand Down

0 comments on commit 13d941a

Please sign in to comment.