Uncaught TypeError: Cannot read property 'pId' of undefined

Hi,

We are triyng to replace the dhtmlxTree with dhtmlxTreeview but on tabbar close we have a javascript error « dhtmlx.js:9 Uncaught TypeError: Cannot read property ‘pId’ of undefined »

You can find the code with the error here : dropbox.com/s/xc2m905jgk0fx … w.zip?dl=0

This is the google chrome debugger log :
Uncaught TypeError: Cannot read property ‘pId’ of undefined
at dhtmlXTreeView._removeItem (dhtmlx.js:9)
at dhtmlXTreeView.clearAll (dhtmlx.js:9)
at dhtmlXTreeView.unload (dhtmlx.js:9)
at window.dhtmlXLayoutCell.dhtmlXCellObject._detachObject (dhtmlx.js:9)
at window.dhtmlXLayoutCell.dhtmlXCellObject.unloadView (dhtmlx.js:9)
at window.dhtmlXLayoutCell.dhtmlXCellObject._unload (dhtmlx.js:9)
at dhtmlXLayoutObject.unload (dhtmlx.js:9)
at window.dhtmlXTabBarCell.dhtmlXCellObject._detachObject (dhtmlx.js:9)
at window.dhtmlXTabBarCell.dhtmlXCellObject.unloadView (dhtmlx.js:9)
at window.dhtmlXTabBarCell.dhtmlXCellObject._unload (dhtmlx.js:9)
_removeItem @ dhtmlx.js:9
clearAll @ dhtmlx.js:9
unload @ dhtmlx.js:9
dhtmlXCellObject._detachObject @ dhtmlx.js:9
dhtmlXCellObject.unloadView @ dhtmlx.js:9
dhtmlXCellObject._unload @ dhtmlx.js:9
unload @ dhtmlx.js:9
dhtmlXCellObject._detachObject @ dhtmlx.js:9
dhtmlXCellObject.unloadView @ dhtmlx.js:9
dhtmlXCellObject._unload @ dhtmlx.js:9
dhtmlXTabBar._removeTab @ dhtmlx.js:9
_doOnTrEnd @ dhtmlx.js:9

Thanks
test.zip (1.03 KB)

Could you provide exact steps to reproduce the problem as closing the tab no errors occur for me.