kevinburke / doony

UI Improvements for Jenkins
http://doony.org
Other
970 stars 116 forks source link

lastBuild is assumed to exist #15

Closed kyleconroy closed 10 years ago

kyleconroy commented 10 years ago

Uncaught TypeError: Cannot read property 'number' of undefined: Line 533

Looks like you aren't checking that data.lastBuild.number exists.

if (isJobHomepage(window.location.pathname)) {
        var jobUrl = getJobUrl(window.location.pathname);
        $.getJSON(jobUrl + 'api/json?tree=lastBuild[number]', function(data) {
            var message = "View console output for the latest test";
            var href = jobUrl + data.lastBuild.number + '/consoleFull';
Uncaught TypeError: Cannot read property 'number' of undefined
            var h2 = $("h2:contains('Permalinks')");
            h2.after(getCallout(message, href));
        });
    }
kevinburke commented 10 years ago

fixed in c4df271