From ea41b3afe4fa66133c7af7365722647d30948443 Mon Sep 17 00:00:00 2001 From: Louis Capitanchik <contact@louiscap.co> Date: Thu, 11 Jul 2019 23:04:45 +0100 Subject: [PATCH] Fix holding invalid reference to synthetic event --- src/App.css | 1 + src/App.js | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/App.css b/src/App.css index 04abfb9..e4f85bf 100644 --- a/src/App.css +++ b/src/App.css @@ -25,6 +25,7 @@ .level-entity { position: absolute; z-index: 10; + image-rendering: crisp-edges; } .render-controls { diff --git a/src/App.js b/src/App.js index 705702a..18a49ba 100644 --- a/src/App.js +++ b/src/App.js @@ -42,7 +42,10 @@ class App extends Component<{}> { ); } - set = (name, value = null) => e => this.setState(s => ({ [name]: value && value.call ? value(s) : value || e.currentTarget.value })) + set = (name, value = null) => e => { + const targetValue = e.currentTarget.value + this.setState(s => ({ [name]: value && value.call ? value(s) : value || targetValue })) + } } export default App; -- GitLab