More logging to help figure out #731

This commit is contained in:
Jordan Eldredge 2019-02-26 07:37:00 -08:00
parent 6a244bb85e
commit b563eebf96

View file

@ -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";
}