error grid_1.destructor ()

Hello, I have a question in the event close the window using the following code:
if (grid_1! = null) {grid_1.destructor ();})
I get the following error message: JavaScript Error
The next error ocured:
this.vs [this.av]. grid.setSizes not is a function in localhost:8084/libp/dhtmlxWindow … ntainer.js at line 23

Unfortunately the issue cannot be reconstructed locally.
If issue still occurs - please, provide any kind of sample of your code.