Fix null check in eventData.title matching

This commit is contained in:
Adam Goldsmith 2021-05-08 15:49:40 -04:00
parent 779b9468f4
commit cbb04c7334

View File

@ -88,8 +88,8 @@ export default class App extends Vue {
// clear the url to prevent clicking on the event // clear the url to prevent clicking on the event
delete eventData.url; delete eventData.url;
const match = eventData.title.match(/([^\/]*) \| ([^-]*) - (.*)/); const match = eventData?.title?.match(/([^\/]*) \| ([^-]*) - (.*)/);
if (match !== null) { if (match) {
const [, member, shop, tool] = match; const [, member, shop, tool] = match;
eventData.title = member; eventData.title = member;
if (this.toolFilter === null || tool.includes(this.toolFilter)) { if (this.toolFilter === null || tool.includes(this.toolFilter)) {