Skip to content

Commit

Permalink
Remove runtime-test that was misguided
Browse files Browse the repository at this point in the history
Turns out that other code was expecting to just get a an empty string if there ware no activity.
  • Loading branch information
hatton committed Jul 15, 2022
1 parent 25d1564 commit 7a8f3a8
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions src/activities/activityManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 7a8f3a8

Please sign in to comment.