crash on missing preview
This commit is contained in:
@@ -112,6 +112,10 @@ export default class AudioPlayer extends React.PureComponent {
|
|||||||
|
|
||||||
// Draw amplitude of sound.
|
// Draw amplitude of sound.
|
||||||
visualize() {
|
visualize() {
|
||||||
|
if (!this.canvasRef.current) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const width = this.effectiveWidth;
|
const width = this.effectiveWidth;
|
||||||
const height = this.canvasRef.current.height;
|
const height = this.canvasRef.current.height;
|
||||||
|
|
||||||
|
|||||||
@@ -9782,6 +9782,10 @@ class AudioPlayer extends (react__WEBPACK_IMPORTED_MODULE_0___default().PureComp
|
|||||||
}
|
}
|
||||||
|
|
||||||
visualize() {
|
visualize() {
|
||||||
|
if (!this.canvasRef.current) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const width = this.effectiveWidth;
|
const width = this.effectiveWidth;
|
||||||
const height = this.canvasRef.current.height;
|
const height = this.canvasRef.current.height;
|
||||||
this.canvasContext.lineWidth = LINE_WIDTH;
|
this.canvasContext.lineWidth = LINE_WIDTH;
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user