diff --git a/src/api/time/TimeAPI.js b/src/api/time/TimeAPI.js index 0ae82e23c1d..8b29a7c5ff8 100644 --- a/src/api/time/TimeAPI.js +++ b/src/api/time/TimeAPI.js @@ -154,10 +154,7 @@ class TimeAPI extends GlobalTimeContext { } // Also emit the mode in case it's different from the previous time context - timeContext.emit( - TIME_CONTEXT_EVENTS.modeChanged, - JSON.parse(JSON.stringify(timeContext.getMode())) - ); + timeContext.emit(TIME_CONTEXT_EVENTS.modeChanged, structuredClone(timeContext.getMode())); // Notify any nested views to update, pass in the viewKey so that particular view can skip getting an upstream context this.emit('refreshContext', key);