From 244053b2dcb82b9cd77644fc9470fee2c91ec944 Mon Sep 17 00:00:00 2001 From: Garrett Michael Flynn Date: Tue, 21 Nov 2023 18:45:14 -0600 Subject: [PATCH] Ensure subject overrides are carried over --- src/renderer/src/stories/pages/guided-mode/data/utils.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/renderer/src/stories/pages/guided-mode/data/utils.js b/src/renderer/src/stories/pages/guided-mode/data/utils.js index 4618e17ba..c1917de2d 100644 --- a/src/renderer/src/stories/pages/guided-mode/data/utils.js +++ b/src/renderer/src/stories/pages/guided-mode/data/utils.js @@ -20,7 +20,8 @@ export function resolveGlobalOverrides(subject, globalState) { delete subjectMetadataCopy.sessions; // Remove extra key from metadata const overrides = structuredClone(globalState.project ?? {}); // Copy project-wide metadata - merge(subjectMetadataCopy, overrides.Subject); + + merge(subjectMetadataCopy, overrides.Subject ?? (overrides.Subject = {})); // Ensure Subject exists return overrides; }