Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Replace double isBlobURL function call with a single one
  • Loading branch information
cpap committed Oct 2, 2020
commit 1007897c1650116a5c66a1e732d4397fcb24998c
5 changes: 3 additions & 2 deletions packages/block-library/src/cover/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ function CoverEdit( {
setGradient,
} = __experimentalUseGradient();
const onSelectMedia = attributesFromMedia( setAttributes );
const isBlogUrl = isBlobURL( url );

const toggleParallax = () => {
setAttributes( {
Expand Down Expand Up @@ -472,7 +473,7 @@ function CoverEdit( {
{
'is-dark-theme': isDark,
'has-background-dim': dimRatio !== 0,
'is-transient': isBlobURL( url ),
'is-transient': isBlogUrl,
'has-parallax': hasParallax,
[ overlayColor.class ]: overlayColor.class,
'has-background-gradient': gradientValue,
Expand Down Expand Up @@ -539,7 +540,7 @@ function CoverEdit( {
style={ { objectPosition: positionValue } }
/>
) }
{ isBlobURL( url ) && <Spinner /> }
{ isBlogUrl && <Spinner /> }
<InnerBlocks
__experimentalTagName="div"
__experimentalPassedProps={ {
Expand Down