diff options
author | David Lu <david.lu@hotmail.com> | 2016-05-20 14:45:30 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-05-20 14:45:30 -0400 |
commit | 4f265522e1ac05ef2c10140019da73e1c4def162 (patch) | |
tree | 7b898d3230eee4ff1adcd0b10cc0c4709abcace9 /webapp/utils/utils.jsx | |
parent | ed2e37394e0bdbd20791c759e033bcb3e6cc4d2c (diff) | |
download | chat-4f265522e1ac05ef2c10140019da73e1c4def162.tar.gz chat-4f265522e1ac05ef2c10140019da73e1c4def162.tar.bz2 chat-4f265522e1ac05ef2c10140019da73e1c4def162.zip |
Fixed JS errors, wrapped around nav shortcuts (#3067)
Diffstat (limited to 'webapp/utils/utils.jsx')
-rw-r--r-- | webapp/utils/utils.jsx | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/webapp/utils/utils.jsx b/webapp/utils/utils.jsx index e2ca06837..2a933ae9c 100644 --- a/webapp/utils/utils.jsx +++ b/webapp/utils/utils.jsx @@ -1408,6 +1408,10 @@ export function localizeMessage(id, defaultMessage) { return id; } +export function mod(a, b) { + return ((a % b) + b) % b; +} + export function getProfilePicSrcForPost(post, timestamp) { let src = Client.getUsersRoute() + '/' + post.user_id + '/image?time=' + timestamp; if (post.props && post.props.from_webhook && global.window.mm_config.EnablePostIconOverride === 'true') { |