client-app/app/lib/preload.js in logster-2.6.1 vs client-app/app/lib/preload.js in logster-2.6.2
- old
+ new
@@ -1,12 +1,21 @@
-let CONTAINER;
+let CONTAINER = {};
let isInitialized = false;
+let rootPath;
+export function setRootPath(path) {
+ rootPath = path;
+}
+
+export function getRootPath() {
+ return rootPath;
+}
+
// exported so that it can be used in tests
export function init() {
const dataset = document.getElementById("preloaded-data").dataset;
CONTAINER = JSON.parse(dataset.preloaded);
- CONTAINER.rootPath = dataset.rootPath;
+ CONTAINER.rootPath = rootPath;
isInitialized = true;
}
export default {
get(key) {