Skip to content

Commit f393b91

Browse files
committed
feat: add defaults to config
debug - false tileDirectory - "images/tiles" iconDirectory - "images/icons" showIdentifiers - false
1 parent e19a93b commit f393b91

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

dist/first-bundle.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/src/init.1.js

+6-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,12 @@ function globalInit() {
9292
var str = stripJsonOfComments(data);
9393
var p = JSON.parse(str);
9494

95-
window.config = p;
95+
window.config = Object.assign({
96+
debug: false,
97+
tileDirectory: "images/tiles",
98+
iconDirectory: "images/icons",
99+
showIdentifiers: false
100+
}, p);
96101

97102
for (const serverName in config.servers) {
98103
// Make sure all servers inherit defaults if they need

0 commit comments

Comments
 (0)