Skip to content

Commit a90fd2e

Browse files
committed
Merge branch 'master' of github.com:andrerpena/react-mde
2 parents 6d1f3a7 + 4530593 commit a90fd2e

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/commands/default-commands/save-image-command.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,7 @@ export const saveImageCommand: Command = {
7979
end: initialState.selection.start + placeHolder.length
8080
});
8181

82-
const realImageMarkdown = `${breaksBefore}![image](${imageUrl})`;
83-
82+
const realImageMarkdown = imageUrl ? `${breaksBefore}![image](${imageUrl})` : "";
8483
const selectionDelta = realImageMarkdown.length - placeHolder.length;
8584

8685
textApi.replaceSelection(realImageMarkdown);

0 commit comments

Comments
 (0)