From 4926a3db214a84f0a1167ef5566af2c8936ec20a Mon Sep 17 00:00:00 2001 From: Adam Harris Date: Wed, 1 Nov 2023 15:28:54 -0700 Subject: [PATCH 1/2] Fix check for pageid --- src/shared/js/components/Sidekick/AddContentDialog.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shared/js/components/Sidekick/AddContentDialog.js b/src/shared/js/components/Sidekick/AddContentDialog.js index 9d01305..f7942e9 100644 --- a/src/shared/js/components/Sidekick/AddContentDialog.js +++ b/src/shared/js/components/Sidekick/AddContentDialog.js @@ -23,7 +23,8 @@ const Templates = ({ open, handleClose, index }) => { const [pageId, setPageId] = useState(''); useEffect(() => { - let metaPageId = document.querySelector('meta[name="pageId"]').content; + const metaPageIdEl = document.querySelector('meta[name="pageId"]'); + let metaPageId = metaPageIdEl ? metaPageIdEl.content : null; if (!metaPageId) { const pageParams = new URLSearchParams(window.location.search); metaPageId = pageParams.get('id'); From 8d6e960280254b42b9d0c6873ec78b545ebcb276 Mon Sep 17 00:00:00 2001 From: Adam Harris Date: Wed, 1 Nov 2023 15:29:50 -0700 Subject: [PATCH 2/2] Update package version --- package.json | 2 +- src/chrome/manifest.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index ecbadf8..8e90ea5 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "contentful-sidekick", - "version": "2.0.1", + "version": "2.0.2", "description": "Chrome Extension that enables inline editing for websites created in Contentful", "main": "index.js", "browserslist": [ diff --git a/src/chrome/manifest.json b/src/chrome/manifest.json index 4966500..82edf28 100644 --- a/src/chrome/manifest.json +++ b/src/chrome/manifest.json @@ -4,7 +4,7 @@ "name": "Contentful Sidekick", "short_name": "sidekick", "description": "Chrome Extension that enables inline editing for websites created in Contentful", - "version": "2.0.1", + "version": "2.0.2", "permissions": ["activeTab", "storage", "tabs", "identity"], "host_permissions": ["http://*/*", "https://*/*", "*://*/*", "*://*.contentful.com/"], "icons": {