Handle Survey qs without answers even more gracefully (e.g. by not

breaking)
This commit is contained in:
Patrick Donelan 2009-01-09 03:37:32 +00:00
parent 11ff75f778
commit 8a4f26215a

View file

@ -389,11 +389,12 @@ if (typeof Survey === "undefined") {
addWidgets: function(qs){
hasFile = false;
for (var i = 0; i < qs.length; i++) {
var q = qs[i];
if (!q || !q.answers) {
// gracefully handle q with no answers
continue;
}
var q = qs[i];
var verts = '';
for (var x in q.answers) {
if (YAHOO.lang.hasOwnProperty(q.answers, x)) {