File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -16,10 +16,10 @@ CMS.registerEditorComponent({
16
16
} ,
17
17
toBlock : function ( obj ) {
18
18
const id = obj . id || '' ;
19
- return `{{ vimeo(id="${ obj . id || '' } ") }}` ;
19
+ return `{{ vimeo(id="${ id } ") }}` ;
20
20
} ,
21
21
toPreview : function ( obj ) {
22
22
const id = obj . id || '' ;
23
- return `{{ vimeo(id="${ obj . id || '' } ") }}` ;
23
+ return `{{ vimeo(id="${ id } ") }}` ;
24
24
} ,
25
25
} ) ;
Original file line number Diff line number Diff line change @@ -16,9 +16,10 @@ CMS.registerEditorComponent({
16
16
} ,
17
17
toBlock : function ( obj ) {
18
18
const id = obj . id || '' ;
19
- return `{{ youtube(id="${ obj . id || '' } ") }}` ;
19
+ return `{{ youtube(id="${ id } ") }}` ;
20
20
} ,
21
21
toPreview : function ( obj ) {
22
- return `<img src="http://img.youtube.com/vi/${ obj . id } /mqdefault.jpg" alt="Youtube Video"/>` ;
22
+ const id = obj . id || '' ;
23
+ return `<img src="http://img.youtube.com/vi/${ id } /mqdefault.jpg" alt="Youtube Video"/>` ;
23
24
} ,
24
25
} ) ;
Original file line number Diff line number Diff line change @@ -40,6 +40,7 @@ CMS.registerEditorComponent({
40
40
return `{{ youtube(id="${ id } "${ p } ${ a } ${ c } ) }}` ;
41
41
} ,
42
42
toPreview : function ( obj ) {
43
- return `<img src="http://img.youtube.com/vi/${ obj . id } /mqdefault.jpg" alt="Youtube Video"/>` ;
43
+ const id = obj . id || '' ;
44
+ return `<img src="http://img.youtube.com/vi/${ id } /mqdefault.jpg" alt="Youtube Video"/>` ;
44
45
} ,
45
46
} ) ;
You can’t perform that action at this time.
0 commit comments