From 7c0b85135e9c746fe1e8c928e8d0b6045492ec77 Mon Sep 17 00:00:00 2001 From: Benny <66417262+ThisIsBenny@users.noreply.github.com> Date: Fri, 30 Oct 2020 20:32:57 +0100 Subject: [PATCH] Update Ecosia.js --- Ecosia/Ecosia.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Ecosia/Ecosia.js b/Ecosia/Ecosia.js index 3d61858..8bd3f12 100644 --- a/Ecosia/Ecosia.js +++ b/Ecosia/Ecosia.js @@ -7,7 +7,7 @@ let widgetInputRAW = args.widgetParameter; let token; if (widgetInputRAW !== null) { token = widgetInputRAW.toString().trim(); - if (/^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$/.text(token) === false) { + if (/^[a-z0-9]{8}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{4}-[a-z0-9]{12}$/.test(token) === false) { throw new Errpr('Invalid Token Format') } } else { @@ -77,4 +77,4 @@ if (!config.runsInWidget) { // Tell the system to show the widget. Script.setWidget(widget) Script.complete() -} \ No newline at end of file +}