We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Minor bug with empty resource array

If I have record in gantt which have resourceId empty array I get error: Uncaught TypeError: Cannot read property 'resourceName' of undefined.
From JS:
        _getResourceInfo: function(n) {
            var i = null , r, t;
            if (n.resourceInfo != null ) { //If array exists
                if (r = n.resourceInfo.length, r > 0) { //And it has content
                    for (t = 0; t < r; t++) //Do some nasty...
                        i == null  ? i = n.resourceInfo[t][this.model.resourceNameMapping] : i += " , " + n.resourceInfo[t][this.model.resourceNameMapping];
                    return i
                return n.resourceInfo[0][this.model.resourceNameMapping] //But if it exists and it dosen't have content -> return first element -> WAT
            return String.empty

Bug is of course easy to workaround, just use null instead of empty array.

1 Reply

MK Mahalakshmi Karthikeyan Syncfusion Team November 16, 2015 08:57 AM UTC

Hi Niko,

Sorry about the inconvenience caused.

We were also able to reproduce the issue while giving empty array as resource id for task in IE9 and below browsers. Hence we have already logged an issue report regarding this. A support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.


Please let us know if you require further assistance on this.      


Mahalakshmi K.

Live Chat Icon For mobile
Up arrow icon