diff --git a/editor.planx.uk/package.json b/editor.planx.uk/package.json index 401820f8f6..6244eb504b 100644 --- a/editor.planx.uk/package.json +++ b/editor.planx.uk/package.json @@ -40,7 +40,7 @@ "@turf/helpers": "^6.5.0", "array-move": "^4.0.0", "axios": "0.27.2", - "camelcase-keys": "^8.0.2", + "camelcase-keys": "^9.0.0", "classnames": "^2.3.2", "core-js": "^3.31.0", "date-fns": "^2.30.0", diff --git a/editor.planx.uk/pnpm-lock.yaml b/editor.planx.uk/pnpm-lock.yaml index f6086ab161..443b048ad7 100644 --- a/editor.planx.uk/pnpm-lock.yaml +++ b/editor.planx.uk/pnpm-lock.yaml @@ -124,8 +124,8 @@ dependencies: specifier: 0.27.2 version: 0.27.2 camelcase-keys: - specifier: ^8.0.2 - version: 8.0.2 + specifier: ^9.0.0 + version: 9.0.0 classnames: specifier: ^2.3.2 version: 2.3.2 @@ -9454,14 +9454,14 @@ packages: resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==} engines: {node: '>= 6'} - /camelcase-keys@8.0.2: - resolution: {integrity: sha512-qMKdlOfsjlezMqxkUGGMaWWs17i2HoL15tM+wtx8ld4nLrUwU58TFdvyGOz/piNP842KeO8yXvggVQSdQ828NA==} - engines: {node: '>=14.16'} + /camelcase-keys@9.0.0: + resolution: {integrity: sha512-GdZ92DNXdcfFB/5Kq4O82EL6UW5neiRBhfNP5M3mGw7CX2sPDbVA04ZPLsqbp7oMi2l3m2I0AZ/kFP5Nk5kopA==} + engines: {node: '>=16'} dependencies: - camelcase: 7.0.1 - map-obj: 4.3.0 + camelcase: 8.0.0 + map-obj: 5.0.0 quick-lru: 6.1.1 - type-fest: 2.19.0 + type-fest: 4.3.1 dev: false /camelcase@5.3.1: @@ -9472,9 +9472,9 @@ packages: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} - /camelcase@7.0.1: - resolution: {integrity: sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==} - engines: {node: '>=14.16'} + /camelcase@8.0.0: + resolution: {integrity: sha512-8WB3Jcas3swSvjIeA2yvCJ+Miyz5l1ZmB6HFb9R1317dt9LCQoswg/BGrmAmkWVEszSrrg4RwmO46qIm2OEnSA==} + engines: {node: '>=16'} dev: false /caniuse-api@3.0.0: @@ -14793,9 +14793,9 @@ packages: engines: {node: '>=0.10.0'} dev: true - /map-obj@4.3.0: - resolution: {integrity: sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==} - engines: {node: '>=8'} + /map-obj@5.0.0: + resolution: {integrity: sha512-2L3MIgJynYrZ3TYMriLDLWocz15okFakV6J12HXvMXDHui2x/zgChzg1u9mFFGbbGWE+GsLpQByt4POb9Or+uA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} dev: false /map-or-similar@1.5.0: diff --git a/editor.planx.uk/src/pages/FlowEditor/lib/store/settings.ts b/editor.planx.uk/src/pages/FlowEditor/lib/store/settings.ts index c8af203ffc..537353da56 100644 --- a/editor.planx.uk/src/pages/FlowEditor/lib/store/settings.ts +++ b/editor.planx.uk/src/pages/FlowEditor/lib/store/settings.ts @@ -28,8 +28,12 @@ export const settingsStore: StateCreator< globalSettings: undefined, - setGlobalSettings: (globalSettings) => - set({ globalSettings: camelcaseKeys(globalSettings) }), + setGlobalSettings: (globalSettings) => { + const fixedKeys = camelcaseKeys( + globalSettings as Record, + ) as GlobalSettings; + set({ globalSettings: fixedKeys }); + }, updateFlowSettings: async (newSettings) => { const { teamSlug, flowSlug } = get();