Skip to content

Commit 93ebcc2

Browse files
author
Julien Castelain
committed
Use object property shorthand
1 parent 9e2ea5c commit 93ebcc2

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/components/buttons/button-embed-video-edit.jsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -78,26 +78,26 @@ class ButtonEmbedVideoEdit extends React.Component {
7878
*/
7979
getInitialState() {
8080
const editor = this.props.editor.get('nativeEditor');
81-
let embed;
81+
let element;
8282

8383
const selection = editor.getSelection();
8484

8585
if (selection) {
8686
const selectedElement = selection.getSelectedElement();
8787

8888
if (selectedElement) {
89-
embed = selectedElement.findOne('[data-widget="videoembed"]');
89+
element = selectedElement.findOne('[data-widget="videoembed"]');
9090
}
9191
}
9292

93-
const videoURL = embed ? embed.getAttribute('data-embed-video-url') : '';
93+
const videoURL = element ? element.getAttribute('data-embed-video-url') : '';
9494

9595
return {
96-
element: embed,
96+
element,
9797
initialEmbed: {
98-
videoURL: videoURL
98+
videoUrl
9999
},
100-
videoURL: videoURL
100+
videoURL
101101
};
102102
}
103103

0 commit comments

Comments
 (0)