Skip to content

Commit

Permalink
fix: produce valid html for top-level document
Browse files Browse the repository at this point in the history
  • Loading branch information
andrew-polk committed Sep 6, 2022
1 parent c4c8235 commit 8c777d3
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions Parse-Dashboard/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,22 +184,22 @@ module.exports = function(config, options) {
</div>`
}
res.send(`<!DOCTYPE html>
<html>
<head>
<link rel="shortcut icon" type="image/x-icon" href="${mountPath}favicon.ico" />
<base href="${mountPath}"/>
<script>
PARSE_DASHBOARD_PATH = "${mountPath}";
</script>
</head>
<html>
<title>Parse Dashboard</title>
<body>
<div id="login_mount"></div>
${errors}
<script id="csrf" type="application/json">"${req.csrfToken()}"</script>
<script src="${mountPath}bundles/login.bundle.js"></script>
</body>
</html>
</head>
<body>
<div id="login_mount"></div>
${errors}
<script id="csrf" type="application/json">"${req.csrfToken()}"</script>
<script src="${mountPath}bundles/login.bundle.js"></script>
</body>
</html>
`);
});

Expand All @@ -212,20 +212,20 @@ module.exports = function(config, options) {
res.append('username', req.user.matchingUsername);
}
res.send(`<!DOCTYPE html>
<html>
<head>
<link rel="shortcut icon" type="image/x-icon" href="${mountPath}favicon.ico" />
<base href="${mountPath}"/>
<script>
PARSE_DASHBOARD_PATH = "${mountPath}";
</script>
</head>
<html>
<title>Parse Dashboard</title>
<body>
<div id="browser_mount"></div>
<script src="${mountPath}bundles/dashboard.bundle.js"></script>
</body>
</html>
</head>
<body>
<div id="browser_mount"></div>
<script src="${mountPath}bundles/dashboard.bundle.js"></script>
</body>
</html>
`);
});
});
Expand Down

0 comments on commit 8c777d3

Please sign in to comment.