diff --git a/.eslintrc.js b/.eslintrc.js index 83fdbbf0ac..46a4bfffb2 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -16,7 +16,7 @@ const eslintrc = { }, settings: { react: { - version: '16.8', + version: '16.9', }, }, parser: '@typescript-eslint/parser', diff --git a/site/theme/template/IconDisplay/IconPicSearcher.tsx b/site/theme/template/IconDisplay/IconPicSearcher.tsx index 3cba906060..fbb4ba8fcc 100644 --- a/site/theme/template/IconDisplay/IconPicSearcher.tsx +++ b/site/theme/template/IconDisplay/IconPicSearcher.tsx @@ -72,7 +72,7 @@ class PicSearcher extends Component { const img = new Image(); img.setAttribute('crossOrigin', 'anonymous'); img.src = url; - img.onload = function() { + img.onload = function onload() { const scale = Math.min(1, 300 / Math.max(img.width, img.height)); const canvas = document.createElement('canvas'); canvas.width = img.width * scale;