Skip to content

Commit

Permalink
Update packages/block-editor/src/components/inserter/tips.js
Browse files Browse the repository at this point in the history
Co-authored-by: Konstantin Obenland <obenland@gmx.de>
  • Loading branch information
retrofox and obenland authored May 5, 2020
1 parent d7dd46e commit ec01471
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions packages/block-editor/src/components/inserter/tips.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,8 @@ function getTipByContext( tipContext ) {

function Tips( { tipContext } ) {
// Return a contextual tip when it's appropriate.
const contextualTip = getTipByContext( tipContext );
if ( contextualTip ) {
return <Tip>{ contextualTip }</Tip>;
if ( tipContext && contextualTips[ tipContext ] ) {
return <Tip>{ contextualTips[ tipContext ] }</Tip>;
}

const [ randomIndex ] = useState(
Expand Down

0 comments on commit ec01471

Please sign in to comment.