Handle Survey qs without answers even more gracefully (e.g. by not
breaking)
This commit is contained in:
parent
11ff75f778
commit
8a4f26215a
1 changed files with 2 additions and 1 deletions
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue