summaryrefslogtreecommitdiffstats
path: root/web/react/utils/utils.jsx
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2016-01-04 15:57:22 -0500
committerChristopher Speller <crspeller@gmail.com>2016-01-04 15:57:22 -0500
commit0c6483b60a230251c6704b85de0c203da37737dc (patch)
tree83bc733c1ec790203429dfb4d056ec44fead6e30 /web/react/utils/utils.jsx
parent67db3ca8ce5e78ee55c37a3dbfb8e5d44037a324 (diff)
parent4b76d6a05d0142c9d1addca698a922e8929674e1 (diff)
downloadchat-0c6483b60a230251c6704b85de0c203da37737dc.tar.gz
chat-0c6483b60a230251c6704b85de0c203da37737dc.tar.bz2
chat-0c6483b60a230251c6704b85de0c203da37737dc.zip
Merge pull request #1801 from hmhealey/plt1602
PLT-1602 Fix ViewImageModal incorrectly assuming it has a file's info in certain cases
Diffstat (limited to 'web/react/utils/utils.jsx')
-rw-r--r--web/react/utils/utils.jsx10
1 files changed, 10 insertions, 0 deletions
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx
index 24d27b10a..a808c9be3 100644
--- a/web/react/utils/utils.jsx
+++ b/web/react/utils/utils.jsx
@@ -1261,3 +1261,13 @@ export function isFeatureEnabled(feature) {
export function isSystemMessage(post) {
return post.type && (post.type.lastIndexOf(Constants.SYSTEM_MESSAGE_PREFIX) === 0);
}
+
+export function fillArray(value, length) {
+ const arr = [];
+
+ for (let i = 0; i < length; i++) {
+ arr.push(value);
+ }
+
+ return arr;
+}