diff options
author | hmhealey <harrisonmhealey@gmail.com> | 2016-01-04 12:23:46 -0500 |
---|---|---|
committer | hmhealey <harrisonmhealey@gmail.com> | 2016-01-04 12:23:46 -0500 |
commit | 4b76d6a05d0142c9d1addca698a922e8929674e1 (patch) | |
tree | 554add4224da338fa4ed31281db81c8e47d9cfe5 /web/react/utils | |
parent | a47d696b95ed613e2870fab430089929a7de5674 (diff) | |
download | chat-4b76d6a05d0142c9d1addca698a922e8929674e1.tar.gz chat-4b76d6a05d0142c9d1addca698a922e8929674e1.tar.bz2 chat-4b76d6a05d0142c9d1addca698a922e8929674e1.zip |
Fixed ViewImage modal to clear its loaded state when its file list changes
Diffstat (limited to 'web/react/utils')
-rw-r--r-- | web/react/utils/utils.jsx | 10 |
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; +} |