diff options
author | Harrison Healey <harrisonmhealey@gmail.com> | 2016-07-18 11:54:42 -0400 |
---|---|---|
committer | Christopher Speller <crspeller@gmail.com> | 2016-07-18 11:54:42 -0400 |
commit | febe3a01cd5db03d152e993d42f39800e494a83a (patch) | |
tree | ef0c6cd294896943bb3b8d10689d76bd261b8758 | |
parent | 4d3b831fd4fe92b064a8d04b4d6473cdc180122a (diff) | |
download | chat-febe3a01cd5db03d152e993d42f39800e494a83a.tar.gz chat-febe3a01cd5db03d152e993d42f39800e494a83a.tar.bz2 chat-febe3a01cd5db03d152e993d42f39800e494a83a.zip |
Fixed use of deprecated function (#3615)
-rw-r--r-- | webapp/components/file_attachment.jsx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/webapp/components/file_attachment.jsx b/webapp/components/file_attachment.jsx index a3dd7ff1d..b6d535b84 100644 --- a/webapp/components/file_attachment.jsx +++ b/webapp/components/file_attachment.jsx @@ -49,7 +49,7 @@ class FileAttachment extends React.Component { if (type === 'image') { var self = this; // Need this reference since we use the given "this" - $('<img/>').attr('src', fileInfo.path + '_thumb.jpg').load(function loadWrapper(path, name) { + $('<img/>').attr('src', fileInfo.path + '_thumb.jpg').on('load', (function loadWrapper(path, name) { return function loader() { $(this).remove(); if (name in self.refs) { @@ -71,7 +71,7 @@ class FileAttachment extends React.Component { self.addBackgroundImage(name, path); } }; - }(fileInfo.path, filename)); + }(fileInfo.path, filename))); } } } |