From 470d9cd7c26fa1e2e594b534d9802570b586e98b Mon Sep 17 00:00:00 2001 From: Abe Jellinek Date: Fri, 25 Mar 2022 16:49:52 -0700 Subject: [PATCH] Update more try-wrapped calls to getString --- chrome/content/zotero/components/virtualized-table.jsx | 5 ++++- chrome/content/zotero/xpcom/error.js | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/chrome/content/zotero/components/virtualized-table.jsx b/chrome/content/zotero/components/virtualized-table.jsx index bb54f8d59c..f1098692f9 100644 --- a/chrome/content/zotero/components/virtualized-table.jsx +++ b/chrome/content/zotero/components/virtualized-table.jsx @@ -1575,7 +1575,10 @@ function formatColumnName(column) { } else if (/^[^\s]+\w\.\w[^\s]+$/.test(column.label)) { try { - return Zotero.getString(column.label); + let labelString = Zotero.getString(column.label); + if (labelString !== column.label) { + return labelString; + } } catch (e) { // ignore missing string diff --git a/chrome/content/zotero/xpcom/error.js b/chrome/content/zotero/xpcom/error.js index 7cacee3e1e..031c8448b0 100644 --- a/chrome/content/zotero/xpcom/error.js +++ b/chrome/content/zotero/xpcom/error.js @@ -89,7 +89,10 @@ Zotero.Exception.Alert.prototype = { get title() { if(this._title) { try { - return Zotero.getString(this._title); + let titleString = Zotero.getString(this._title); + if (titleString !== this._title) { + return titleString; + } } catch(e) {} } try {