From 7551a6ca965e53048a4991bf482d7bf9873f6d98 Mon Sep 17 00:00:00 2001 From: Ralf Vogler Date: Sat, 19 Aug 2023 17:04:33 +0200 Subject: [PATCH] pg: fixup e2e28301e6ab7acb16b525f5580bbd4cb01a4b0a? --- prime-gaming.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/prime-gaming.js b/prime-gaming.js index bdd662d..1f165b3 100644 --- a/prime-gaming.js +++ b/prime-gaming.js @@ -334,7 +334,7 @@ try { unlinked_store = await linkAccountButton.getAttribute('aria-label'); console.debug(' LinkAccountButton label:', unlinked_store); const match = unlinked_store.match(/Link (.*) account/); - if (match.length == 2) unlinked_store = match[1]; + if (match && match.length == 2) unlinked_store = match[1]; } else if(await page.locator('text=Link game account').count()) { // epic-games only? console.error(' Missing account linking (epic-games specific button?):', await page.locator('button[data-a-target="gms-cta"]').innerText()); // TODO needed? unlinked_store = 'epic-games';