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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Minor bug with empty resource array

Thread ID:





121135 Nov 13,2015 08:09 AM UTC Nov 16,2015 08:57 AM UTC JavaScript 1
Tags: ejGantt
Niko Autio
Asked On November 13, 2015 08:09 AM UTC

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.

Mahalakshmi Karthikeyan [Syncfusion]
Replied On 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.


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon