File tree Expand file tree Collapse file tree 2 files changed +24
-0
lines changed
plugin/assets/src/block-editor/blocks Expand file tree Collapse file tree 2 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,18 @@ const deprecated = [
3131 {
3232 attributes : { ...omit ( attributes , [ 'imageElement' ] ) } ,
3333 save,
34+ migrate ( attr ) {
35+ if ( 'undefined' === typeof attr . imageElement ) {
36+ attr = {
37+ ...attr ,
38+ ...{
39+ imageElement : true ,
40+ } ,
41+ } ;
42+ }
43+
44+ return attr ;
45+ } ,
3446 isEligible ( attr ) {
3547 return 'undefined' === typeof attr . imageElement ;
3648 } ,
Original file line number Diff line number Diff line change @@ -31,6 +31,18 @@ const deprecated = [
3131 {
3232 attributes : { ...omit ( attributes , [ 'imageElement' ] ) } ,
3333 save,
34+ migrate ( attr ) {
35+ if ( 'undefined' === typeof attr . imageElement ) {
36+ attr = {
37+ ...attr ,
38+ ...{
39+ imageElement : true ,
40+ } ,
41+ } ;
42+ }
43+
44+ return attr ;
45+ } ,
3446 isEligible ( attr ) {
3547 return 'undefined' === typeof attr . imageElement ;
3648 } ,
You can’t perform that action at this time.
0 commit comments