File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -169,17 +169,17 @@ const Edit = props => {
169169 // For blocks with variations, do not remove the uniqueId
170170 // since that will prompt the layout picker to show.
171171 const hasVariations = ! ! getBlockType ( blockName ) && getBlockVariations ( blockName ) . length > 0
172- if ( ! hasVariations && block . attributes . uniqueId ) {
172+ if ( ! hasVariations && block . attributes ? .uniqueId ) {
173173 delete block . attributes . uniqueId
174174 }
175175
176- const customAttributes = block . attributes . customAttributes
176+ const customAttributes = block . attributes ? .customAttributes
177177
178178 const isDesignLibraryDevMode = devMode && localStorage . getItem ( 'stk__design_library__dev_mode' ) === '1'
179179 if ( ! isDesignLibraryDevMode ) {
180180 const indexToDelete = customAttributes ?. findIndex ( attribute => attribute [ 0 ] === 'stk-design-library__bg-target' )
181181 if ( customAttributes && indexToDelete !== - 1 ) {
182- block . attributes . customAttributes . splice ( indexToDelete , 1 )
182+ block . attributes ? .customAttributes . splice ( indexToDelete , 1 )
183183 }
184184 }
185185
You can’t perform that action at this time.
0 commit comments