Skip to content

Commit

Permalink
Fix "Uncaught TypeError: is not iterable" (#1701)
Browse files Browse the repository at this point in the history
  • Loading branch information
erikn69 authored Nov 13, 2024
1 parent 673da81 commit cf7872b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/Resources/queries/widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,8 @@
},

identifyDuplicates: function(statements) {
if (! Array.isArray(statements)) statements = [];

const makeStatementHash = (statement) => {
return [
statement.sql,
Expand Down Expand Up @@ -341,8 +343,8 @@
const $li = $('<li />').addClass(csscls('table-list-item'));
const $muted = $('<span />').addClass(css('text-muted'));

let i = 0;
for (const value of values) {
for (const i in values) {
const value = values[i];
if (showLineNumbers) {
$ul.append($li.clone().append([$muted.clone().text(`${i}:`), '&nbsp;', $('<span/>').text(value)]));
} else {
Expand All @@ -352,7 +354,6 @@
$ul.append($li.clone().text(value));
}
}
i++;
}

return this.renderDetail(caption, icon, $ul);
Expand Down

0 comments on commit cf7872b

Please sign in to comment.