diff --git a/src/state/selectors/manifests.js b/src/state/selectors/manifests.js index e0ea6054e..8c99dc926 100644 --- a/src/state/selectors/manifests.js +++ b/src/state/selectors/manifests.js @@ -10,6 +10,7 @@ import { getConfig } from './config'; /** */ function createManifestoInstance(json, locale) { if (!json) return undefined; + // Use JSON stringify/parse to create a deep copy and prevent Manifesto from mutating the json const manifestoObject = Utils.parseManifest(JSON.parse(JSON.stringify(json)), locale ? { locale } : undefined); // Local patching of Manifesto so that when its a Collection, it behaves similarly if (typeof manifestoObject.getSequences != 'function') {