summaryrefslogtreecommitdiffstats
path: root/web
diff options
context:
space:
mode:
authornickago <ngonella@calpoly.edu>2015-06-29 17:06:04 -0700
committernickago <ngonella@calpoly.edu>2015-06-29 17:06:04 -0700
commit6df00cadb5fc6f3d1780cdac9f11c11ed0841a01 (patch)
treeec87efbf7396a215e0507133a693da5a99995bf1 /web
parente6b5bdef82b23d61286ff455ee245a26a40d195f (diff)
downloadchat-6df00cadb5fc6f3d1780cdac9f11c11ed0841a01.tar.gz
chat-6df00cadb5fc6f3d1780cdac9f11c11ed0841a01.tar.bz2
chat-6df00cadb5fc6f3d1780cdac9f11c11ed0841a01.zip
Updated file display key to avoid child flattening
Diffstat (limited to 'web')
-rw-r--r--web/react/components/post_body.jsx3
1 files changed, 2 insertions, 1 deletions
diff --git a/web/react/components/post_body.jsx b/web/react/components/post_body.jsx
index 3079917ec..0fffec021 100644
--- a/web/react/components/post_body.jsx
+++ b/web/react/components/post_body.jsx
@@ -89,6 +89,7 @@ module.exports = React.createClass({
var fileInfo = utils.splitFileLocation(filenames[i]);
if (Object.keys(fileInfo).length === 0) continue;
+
var type = utils.getFileType(fileInfo.ext);
if (type === "image") {
@@ -102,7 +103,7 @@ module.exports = React.createClass({
images.push(filenames[i]);
} else if (i < Constants.MAX_DISPLAY_FILES) {
postFiles.push(
- <div className="post-image__column custom-file" key={fileInfo.name}>
+ <div className="post-image__column custom-file" key={fileInfo.name+fileInfo.ext}>
<a href={fileInfo.path+"."+fileInfo.ext} download={fileInfo.name+"."+fileInfo.ext}>
<div className={"file-icon "+utils.getIconClassName(type)}/>
</a>