about summary refs log tree commit diff
path: root/app/javascript/mastodon/features/ui/components/image_loader.js
diff options
context:
space:
mode:
authorYamagishi Kazutoshi <ykzts@desire.sh>2017-06-02 00:25:10 +0900
committerEugen Rochko <eugen@zeonfederated.com>2017-06-01 17:25:10 +0200
commitfda5c699c2d1165381da87ffe12ebc92e6529f47 (patch)
tree7dc323f20bca826572707547068ca64960ed5a43 /app/javascript/mastodon/features/ui/components/image_loader.js
parentcb7ee4698f2a62e15da0db2a5def866615aab57e (diff)
Add ESLint rule (object-curly-spacing) (#3498)
Diffstat (limited to 'app/javascript/mastodon/features/ui/components/image_loader.js')
-rw-r--r--app/javascript/mastodon/features/ui/components/image_loader.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/app/javascript/mastodon/features/ui/components/image_loader.js b/app/javascript/mastodon/features/ui/components/image_loader.js
index af2870517..2a2cbb9bf 100644
--- a/app/javascript/mastodon/features/ui/components/image_loader.js
+++ b/app/javascript/mastodon/features/ui/components/image_loader.js
@@ -22,11 +22,11 @@ class ImageLoader extends React.PureComponent {
 
   loadImage(src) {
     const image = new Image();
-    image.onerror = () => this.setState({loading: false, error: true});
-    image.onload = () => this.setState({loading: false, error: false});
+    image.onerror = () => this.setState({ loading: false, error: true });
+    image.onload = () => this.setState({ loading: false, error: false });
     image.src = src;
     this.lastSrc = src;
-    this.setState({loading: true});
+    this.setState({ loading: true });
   }
 
   render() {