Fixed use of deprecated function (#3615)

Этот коммит содержится в:
Harrison Healey
2016-07-18 11:54:42 -04:00
коммит произвёл Christopher Speller
родитель 4d3b831fd4
Коммит febe3a01cd

Просмотреть файл

@@ -49,7 +49,7 @@ class FileAttachment extends React.Component {
if (type === 'image') { if (type === 'image') {
var self = this; // Need this reference since we use the given "this" 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() { return function loader() {
$(this).remove(); $(this).remove();
if (name in self.refs) { if (name in self.refs) {
@@ -71,7 +71,7 @@ class FileAttachment extends React.Component {
self.addBackgroundImage(name, path); self.addBackgroundImage(name, path);
} }
}; };
}(fileInfo.path, filename)); }(fileInfo.path, filename)));
} }
} }
} }