Invalid array length

I'm developing an mobile app by using Cordova. I'm creating a function which
is hiding the Cesium Wrapper div and show a panorama image on another div. But I get this error when I hide the panorama div and display the Cesium Wrapper div. Anyone can help me? Thanks.
Error :

Hi there,

It’s hard to see exactly what’s going wrong since the error message isn’t displaying any relevant info. Do you have a more descriptive error message in the console?

How are you hiding and displaying the div? It could be that Cesium lost the WebGL context when you hid the div.