Skip to content

Commit

Permalink
hacky globalThis
Browse files Browse the repository at this point in the history
  • Loading branch information
anthonyshull committed Jul 5, 2024
1 parent 60ac4c3 commit 9b9fdd1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions assets/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@ import setupTripPlannerForm from "./trip-planner-form.js";
import { Socket } from "phoenix";
import { LiveSocket } from "phoenix_live_view";

if (typeof globalThis === "undefined") {
var globalThis = Function("return this")();
}

let csrfToken = document
.querySelector("meta[name='csrf-token']")
.getAttribute("content");
Expand Down

0 comments on commit 9b9fdd1

Please sign in to comment.