Tabbar addView: error when cells[] are empty

Tabbar addView doesn’t work when cells[] are empty. To simulate this you can open your example: Tabview: Adding and Removing tabs

  1. Add new tab by pressing “Add tab”. Go to the new tab and check that content exists (“New content …”).

  2. Remove all tabs by pressing “Remove tab” several times.

  3. Add new tab by pressing “Add tab”. Check that content of the new tab is empty (because of error in webix.js).

  4. Open browser console and see the error (“Uncaught TypeError: Cannot read property ‘style’ of null”).

Could you please suggest how to avoid this error? Thank you.

Due to the multiview logic, it must always contain at least one cell to avoid any errors. We will add a corresponding warning to the debug version of the library and fix the sample, but the most suitable solution is to replace the last cell with an empty template (or anything you need), i.e. applyaddView, thenremoveView