Let's say when baseline 0 and 2 were made, i had 3 tasks - A, B and C. But while doing baseline 1, task B was missing. Should task B's baselise json array be like this:
So when adding baselines for a task, we ensure that previous baselines exist. So let's say in your case, when you made baseline 2, the baseline 1 will also be made for task B. It is worth mentioning here that baselines on a task is a store, when adding something on index 2, we need to make sure values for index 0 and 1, exists to ensure consistency. You can check this behaviour here in our example for baselines.
How you are doing that? Have you customised the baseline feature? Because as far as our baselines feature is concerned, it shouldn't be possible. How you are saving these baselines? Because setting null there might result in some issues as we never considered it's use in such a way.
We are not using Bryntum Gantt to save the baseline. We have a server-side feature that does it. Given 1) a baseline number to save 2) set of tasks. It will save the tasks' dates to the baseline. I don't see any problem with our approach. If a baseline is missing, just dont show the bar. Simple.
Providing null-s in such case sounds logical yet the Gantt code will probably throw an exception then.
At the moment you can try providing empty objects for such entries instead.
Please let us how that worked!