Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
mattermost-webapp
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
sysadmin
mattermost
mattermost-webapp
Commits
345afddc
Commit
345afddc
authored
Nov 30, 2018
by
Harrison Healey
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MM-13176 Fix error when previewing a message (#2106)
parent
1a0d0ff5
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
components/post_markdown/post_markdown.jsx
components/post_markdown/post_markdown.jsx
+1
-1
components/post_markdown/post_markdown.test.jsx
components/post_markdown/post_markdown.test.jsx
+7
-0
No files found.
components/post_markdown/post_markdown.jsx
View file @
345afddc
...
...
@@ -71,7 +71,7 @@ export default class PostMarkdown extends React.PureComponent {
proxyImages
=
{
proxyImages
}
options
=
{
this
.
props
.
options
}
channelNamesMap
=
{
channelNamesMap
}
imagesMetadata
=
{
this
.
props
.
post
.
metadata
&&
this
.
props
.
post
.
metadata
.
images
}
imagesMetadata
=
{
this
.
props
.
post
&&
this
.
props
.
post
.
metadata
&&
this
.
props
.
post
.
metadata
.
images
}
/>
);
}
...
...
components/post_markdown/post_markdown.test.jsx
View file @
345afddc
...
...
@@ -15,6 +15,13 @@ describe('components/PostMarkdown', () => {
post
:
{},
};
test
(
'
should not error when rendering without a post
'
,
()
=>
{
const
props
=
{...
baseProps
};
Reflect
.
deleteProperty
(
props
,
'
post
'
);
shallow
(<
PostMarkdown
{
...
props
}
/>);
});
test
(
'
should render properly with an empty post
'
,
()
=>
{
const
wrapper
=
shallow
(
<
PostMarkdown
{
...
baseProps
}
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment