From d39734fa6cb255bc431f7774b9dcf8de07e054c0 Mon Sep 17 00:00:00 2001 From: Thomas Groman Date: Thu, 7 May 2020 22:07:08 -0700 Subject: make getCellPrperties more robust --- webbrowser/modules/AutoCompletePopup.jsm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'webbrowser') diff --git a/webbrowser/modules/AutoCompletePopup.jsm b/webbrowser/modules/AutoCompletePopup.jsm index c3698f9..ec2de26 100644 --- a/webbrowser/modules/AutoCompletePopup.jsm +++ b/webbrowser/modules/AutoCompletePopup.jsm @@ -1,7 +1,3 @@ -/* This Source Code Form is subject to the terms of the Mozilla Public - * License, v. 2.0. If a copy of the MPL was not distributed with this - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ - "use strict"; const Cc = Components.classes; @@ -42,7 +38,10 @@ var AutoCompleteTreeView = { getParentIndex: function(idx) { return -1; }, hasNextSibling: function(idx, after) { return idx < this.results.length - 1 }, toggleOpenState: function(idx) { }, - getCellProperties: function(idx, column) { return this.results[idx].style || ""; }, + getCellProperties: function(idx, column) { + if (this.results && this.results[idx]) { return this.results[idx].style || ""; } + else { return ""; } + }, getRowProperties: function(idx) { return ""; }, getImageSrc: function(idx, column) { return null; }, getProgressMode : function(idx, column) { }, -- cgit v1.2.3