Skip to content

Commit f4765c5

Browse files
authored
Merge pull request #133 from DiamondLightSource/store-config-fix
Bugfix for boolean PVWS_SOCKET treated as string
2 parents 7a3a3f2 + d6ce256 commit f4765c5

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@diamondlightsource/cs-web-lib",
3-
"version": "0.9.0",
3+
"version": "0.9.1",
44
"description": "Control system web library",
55
"main": "dist/cjs/index.js",
66
"scripts": {

src/redux/store.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,10 @@ const buildConnection = (config?: CsWebLibConfig) => {
2323
config?.PVWS_SOCKET ??
2424
process.env.VITE_PVWS_SOCKET ??
2525
import.meta.env.VITE_PVWS_SOCKET;
26-
const PVWS_SSL =
27-
(config?.PVWS_SSL ??
28-
process.env.VITE_PVWS_SSL ??
29-
import.meta.env.VITE_PVWS_SSL) === "true";
26+
const PVWS_SSL = !!(
27+
config?.PVWS_SSL ??
28+
(process.env.VITE_PVWS_SSL ?? import.meta.env.VITE_PVWS_SSL) === "true"
29+
);
3030

3131
const simulator = new SimulatorPlugin();
3232
const plugins: [string, Connection][] = [["sim://", simulator]];

0 commit comments

Comments
 (0)