From 1b8cfefe369384eb3d1699c51981279a78beecb7 Mon Sep 17 00:00:00 2001 From: robindrost Date: Thu, 14 Sep 2023 09:01:52 +0200 Subject: [PATCH] Update the selector of the main div Remove the true attribute since it does not exist anymore. This results in an undefined phx id. --- priv/templates/utilities/phoenix-liveview.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/priv/templates/utilities/phoenix-liveview.js b/priv/templates/utilities/phoenix-liveview.js index fd669c3..1ca5bce 100644 --- a/priv/templates/utilities/phoenix-liveview.js +++ b/priv/templates/utilities/phoenix-liveview.js @@ -62,7 +62,7 @@ export default class Liveview { let doc = parseHTML(body); let csrfToken = doc.find('meta[name="csrf-token"]').attr("content"); - let phxMain = doc.find('div[data-phx-main="true"]'); + let phxMain = doc.find('div[data-phx-main]'); let phxId = phxMain.attr("id"); let phxSession = phxMain.attr("data-phx-session"); let phxStatic = phxMain.attr("data-phx-static");