taler-typescript-core

Wallet core logic and WebUIs for various components
Log | Files | Refs | Submodules | README | LICENSE

commit 8505b7967421d4e4c80ab7d35c07489cb782e08b
parent 386f37cbd8b7f804f186b38cecf39189498337eb
Author: Nullptrderef <nullptrderef@proton.me>
Date:   Tue, 20 Aug 2024 10:17:12 +0200

fix: on chromium-based browsers, `chrome` isn't undefined but also only implements a tiny subset of ext chrome

Diffstat:
Mpackages/taler-wallet-webextension/src/components/WalletActivity.tsx | 6++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/packages/taler-wallet-webextension/src/components/WalletActivity.tsx b/packages/taler-wallet-webextension/src/components/WalletActivity.tsx @@ -722,7 +722,7 @@ function refresh( let currentTab: chrome.tabs.Tab | undefined; // Allow running outside the extension for testing // tslint:disable-next-line:no-string-literal -if (typeof chrome !== "undefined") { +if (typeof chrome !== "undefined" && typeof chrome.tabs !== "undefined") { const p = chrome.tabs.getCurrent(); // this may be called outside the render phase (in the background) // when this happen currentTab is not needed but also undefined @@ -1069,7 +1069,9 @@ export function ActiveTasksTable(): VNode { {task.transaction ? ( <a title={task.transaction} - href={`#${Pages.balanceTransaction({ tid: task.transaction })}`} + href={`#${Pages.balanceTransaction({ + tid: task.transaction, + })}`} > {task.transaction.substring(0, 10)} </a>