From 7a8f3a8dd17ba98b1ac840492b4c2474777c9c9e Mon Sep 17 00:00:00 2001 From: Hatton Date: Fri, 15 Jul 2022 14:52:31 -0600 Subject: [PATCH] Remove runtime-test that was misguided Turns out that other code was expecting to just get a an empty string if there ware no activity. --- src/activities/activityManager.ts | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/src/activities/activityManager.ts b/src/activities/activityManager.ts index 8c915be3..40a8be59 100644 --- a/src/activities/activityManager.ts +++ b/src/activities/activityManager.ts @@ -98,20 +98,11 @@ export class ActivityManager { // the moment the html data-analyticscategories attribute is plural, // but here in code we know that we currently only handle the whole // thing as a single string, so we just call it "category". - const category = + return ( pageDiv.getAttribute("data-analyticscategories") || pageDiv.getAttribute("data-analyticsCategories") || - ""; - if (!category) { - window.alert( - "Activity pages must have a data-analyticscategories attribute." - ); - throw new Error( - "Activity pages must have a data-analyticscategories attribute." - ); - } else { - return category; - } + "" + ); } public processPage(