From 6df00cadb5fc6f3d1780cdac9f11c11ed0841a01 Mon Sep 17 00:00:00 2001
From: nickago <ngonella@calpoly.edu>
Date: Mon, 29 Jun 2015 17:06:04 -0700
Subject: Updated file display key to avoid child flattening

---
 web/react/components/post_body.jsx | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

(limited to 'web/react/components/post_body.jsx')

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>
-- 
cgit v1.2.3-1-g7c22


From 351068491e506eb228335fa100d1aa0416ae132f Mon Sep 17 00:00:00 2001
From: nickago <ngonella@calpoly.edu>
Date: Mon, 29 Jun 2015 17:19:00 -0700
Subject: Changed the style of key-assignment to allow for more assured
 variance

---
 web/react/components/post_body.jsx | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

(limited to 'web/react/components/post_body.jsx')

diff --git a/web/react/components/post_body.jsx b/web/react/components/post_body.jsx
index 0fffec021..7d5ef4d33 100644
--- a/web/react/components/post_body.jsx
+++ b/web/react/components/post_body.jsx
@@ -89,7 +89,6 @@ 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") {
@@ -103,7 +102,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+fileInfo.ext}>
+                        <div className="post-image__column custom-file" key={fileInfo.name+i}>
                             <a href={fileInfo.path+"."+fileInfo.ext} download={fileInfo.name+"."+fileInfo.ext}>
                                 <div className={"file-icon "+utils.getIconClassName(type)}/>
                             </a>
-- 
cgit v1.2.3-1-g7c22

