Using responsive param created "Cannot read property 'length' of null" error
See original GitHub issueWavesurfer.js version(s):
"wavesurfer.js": "^2.0.5",
Browser version(s):
Mac Chrome 70
Code needed to reproduce the issue:
Using React, I load the below code. I noticed that the error only occurs with responsive: true
. Commenting it out works cleanly.
this.wavesurfer = WaveSurfer.create({
container: this.el,
waveColor: color,
progressColor: color,
cursorColor: '#5173E7',
cursorWidth: 3,
barWidth: 1,
responsive: true,
height,
audioRate
})
Error it produces in console
Uncaught TypeError: Cannot read property 'length' of null
at t.value (wavesurfer.min.js:6)
at t.value (wavesurfer.min.js:6)
at wavesurfer.min.js:6
at wavesurfer.min.js:6
at Array.forEach (<anonymous>)
at t.value (wavesurfer.min.js:6)
at wavesurfer.min.js:6
at n (wavesurfer.min.js:6)
at wrapped (index.js:3221)
value @ wavesurfer.min.js:6
value @ wavesurfer.min.js:6
(anonymous) @ wavesurfer.min.js:6
(anonymous) @ wavesurfer.min.js:6
value @ wavesurfer.min.js:6
(anonymous) @ wavesurfer.min.js:6
n @ wavesurfer.min.js:6
wrapped @ index.js:3221
setTimeout (async)
(anonymous) @ index.js:3430
l @ wavesurfer.min.js:6
wrapped @ index.js:3221
Issue Analytics
- State:
- Created 5 years ago
- Comments:13
Top Results From Across the Web
Using responsive param created Cannot read property 'length ...
Using React, I load the below code. I noticed that the error only occurs with responsive: true . Commenting it out works cleanly....
Read more >[Solved] TypeError: Cannot read property 'length' of null
This error indicates that the code is trying to compute the length property on a null variable. A null variable holds no or...
Read more >TypeError: Cannot read property 'length' of null, how can i ...
Try using "input?.length" within your "for" loop. There is no "length" property to "input" so you get an error.
Read more >Uncaught TypeError: Cannot read property of undefined
If you get undefined error, you need to make sure that which ever variables throws undefined error, is assigned a value to it....
Read more >Cannot read property 'length' of undefined with AJAX Resonse
Hi,. I am facing a issue above when I update a column on data tables, here is my client side code var editor...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
if you do not recognize that as a broken JS object, I don’t know what to say.
Sorry - I have lint, that was a copy paste mistake. Same error with the comma