Skip to content

Commit

Permalink
EX-3861: Error caused by Interactive Seating Chart on events in Core (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
gm4git authored Apr 5, 2021
1 parent 38cd006 commit c79b312
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build/tevomaps.js

Large diffs are not rendered by default.

Binary file modified build/tevomaps.js.gz
Binary file not shown.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ticketevolution/seatmaps-client",
"version": "1.3.2",
"version": "1.3.4",
"description": "A client side JavaScript library that enables users to view interactive seating charts for tickets available via the Ticket Evolution API.",
"keywords": [
"Ticket Evolution",
Expand Down
3 changes: 3 additions & 0 deletions src/TicketMap/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -405,6 +405,9 @@ export default class TicketMap extends Component<Props & DefaultProps, State> {
}

getSectionFromTarget(target: HTMLElement) {
if (!target) {
return;
}
const element = target.closest("[data-section-id]");
if (!element) {
return;
Expand Down
8 changes: 7 additions & 1 deletion src/__tests__/TicketMap/index.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -680,12 +680,18 @@ describe("TicketMap", () => {
describe("getSectionFromTarget", () => {
let target: HTMLElement;

it("should return undefined if section has empty id", async () => {
it("returns undefined if section has empty id", async () => {
target = document.createElement("path");
target.setAttribute("data-section-id", "");

expect(wrapper.instance().getSectionFromTarget(target)).toBeUndefined();
});

it("returns undefined if passed target is undefined", async () => {
expect(
wrapper.instance().getSectionFromTarget(null as any)
).toBeUndefined();
});
});

describe("getDefaultColor", () => {
Expand Down

0 comments on commit c79b312

Please sign in to comment.