diff --git a/package-lock.json b/package-lock.json index 32ba69a..395a4ac 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "daedalus", - "version": "0.0.4", + "version": "0.0.5", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "daedalus", - "version": "0.0.4", + "version": "0.0.5", "dependencies": { "@diamondlightsource/cs-web-lib": "^0.9.7", "@emotion/react": "^11.11.4", diff --git a/package.json b/package.json index a9efb99..135778e 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "daedalus", "private": true, - "version": "0.0.4", + "version": "0.0.5", "type": "module", "scripts": { "dev": "vite", diff --git a/src/components/ScreenDisplay.tsx b/src/components/ScreenDisplay.tsx index 3be383e..6fa89e0 100644 --- a/src/components/ScreenDisplay.tsx +++ b/src/components/ScreenDisplay.tsx @@ -70,8 +70,9 @@ export default function ScreenDisplay() { const currentFile = Object.values(allFiles).find( values => values.file === displayedPath ); - if (currentFile?.urlId !== pathname) { - // URL and state are out of sync with file displayed, update accordingly + + if (currentFile?.urlId && currentFile.urlId !== pathname) { + // URL and state are out of sync with file displayed, update accordingly, if currentFile is null this file is not in the JsonMap navigate(`/synoptic/${state.currentBeamline}/${currentFile?.urlId}`, { state: location.state, replace: true