From: John Foerch Date: Fri, 8 Nov 2013 04:29:47 +0000 (-0500) Subject: completions_tree_view.getCellProperties: fix for XULRunner >= 22 X-Git-Tag: debian-1.0--pre-1+git160130-1~133 X-Git-Url: https://repo.or.cz/w/conkeror.git/commitdiff_plain/38b6279c2053854c2e8f24e70facb5328d9f170c completions_tree_view.getCellProperties: fix for XULRunner >= 22 Conkeror would issue errors like the following to the terminal when running on XULRunner 22 or later: Console error: [JavaScript Error: "TypeError: props is undefined" {file: "chrome://conkeror/content/minibuffer-read.js" line: 69}] Category: chrome javascript The behavior of getCellProperties was changed in XULRunner 22, so this patch is an update for that change. --- diff --git a/modules/minibuffer-read.js b/modules/minibuffer-read.js index be35ed3..000bbed 100644 --- a/modules/minibuffer-read.js +++ b/modules/minibuffer-read.js @@ -68,9 +68,12 @@ completions_tree_view.prototype = { getRowProperties: function (row, props) {}, getCellProperties: function (row, col, props) { if (col.index == 0) - props.AppendElement(atom_service.getAtom("completion-string")); + var a = atom_service.getAtom("completion-string"); else - props.AppendElement(atom_service.getAtom("completion-description")); + a = atom_service.getAtom("completion-description"); + if (props) + props.AppendElement(a); + return a; }, getColumnProperties: function (colid, col, props) {} };