Skip to content

Commit

Permalink
🐛 creating an element with id admin triggered admin style data loadin…
Browse files Browse the repository at this point in the history
…g on prod
  • Loading branch information
danyx23 committed Sep 28, 2023
1 parent c1e6bb8 commit 5b26bb0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions site/gdocs/OwidGdoc.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,11 @@ export function OwidGdoc({
>
<DocumentContext.Provider value={{ isPreviewing }}>
<div id="gdoc-admin-bar">
<a href="#" id="gdoc">
<a href="#" id="gdoc-link">
Gdoc
</a>
<span>/</span>
<a href="#" id="admin">
<a href="#" id="admin-link">
Admin
</a>
</div>
Expand Down
4 changes: 2 additions & 2 deletions site/owid.entry.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,8 +108,8 @@ try {
if (id) {
const gdocLink = `https://docs.google.com/document/d/${id}/edit`
const adminLink = `${ADMIN_BASE_URL}/admin/gdocs/${id}/preview`
const admin = gdocAdminBar.querySelector("#admin")
const gdoc = gdocAdminBar.querySelector("#gdoc")
const admin = gdocAdminBar.querySelector("#admin-link")
const gdoc = gdocAdminBar.querySelector("#gdoc-link")
if (admin && gdoc) {
admin.setAttribute("href", adminLink)
admin.setAttribute("target", "_blank")
Expand Down

0 comments on commit 5b26bb0

Please sign in to comment.