From b563eebf960536cddd768fda0cd721be88382cc8 Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Tue, 26 Feb 2019 07:37:00 -0800 Subject: [PATCH] More logging to help figure out #731 --- js/components/MilkdropWindow/Milkdrop.js | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/js/components/MilkdropWindow/Milkdrop.js b/js/components/MilkdropWindow/Milkdrop.js index 82d61ebd..ea04b966 100644 --- a/js/components/MilkdropWindow/Milkdrop.js +++ b/js/components/MilkdropWindow/Milkdrop.js @@ -32,6 +32,10 @@ class Milkdrop extends React.Component { pixelRatio: window.devicePixelRatio || 1 } ); + if (this.visualizer == null) { + // https://github.com/captbaritone/webamp/issues/731 + throw new Error("Visualizer not initialized. WAT."); + } this.visualizer.connectAudio(this.props.analyser); this.presetCycle = !this.props.initialPreset; if (this.props.initialPreset) { @@ -58,6 +62,10 @@ class Milkdrop extends React.Component { this._unsubscribeFocusedKeyDown = this.props.onFocusedKeyDown( this._handleFocusedKeyboardInput ); + if (this.visualizer == null) { + // https://github.com/captbaritone/webamp/issues/731 + throw new Error("Visualizer not initialized after await. WAT."); + } this.__debugState = "MOUNT_ENDED"; }