From a08f79296667da08a9cd42ba69ba4cc3f0b84c65 Mon Sep 17 00:00:00 2001 From: jberg Date: Tue, 15 May 2018 19:22:18 -0700 Subject: [PATCH] move to constructor --- js/components/MilkdropWindow/index.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/js/components/MilkdropWindow/index.js b/js/components/MilkdropWindow/index.js index 8724cb53..9dcf5f76 100644 --- a/js/components/MilkdropWindow/index.js +++ b/js/components/MilkdropWindow/index.js @@ -7,6 +7,10 @@ const PRESET_TRANSITION_SECONDS = 2.7; const MILLISECONDS_BETWEEN_PRESET_TRANSITIONS = 15000; class MilkdropWindow extends React.Component { + constructor(props) { + super(props); + this._handleKeyboardInput = this._handleKeyboardInput.bind(this); + } componentDidMount() { require.ensure( [ @@ -44,8 +48,6 @@ class MilkdropWindow extends React.Component { "butterchurn" ); - this._handleKeyboardInput = this._handleKeyboardInput.bind(this); - require.ensure( ["butterchurn-presets"], require => {