Skip to content

Commit 195abe6

Browse files
authored
Merge pull request #700 from TerriaJS/app-name-title
Override default title with appName on app start.
2 parents 082810c + 74f8d8a commit 195abe6

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

index.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,13 @@ module.exports = terria
8181
terria.raiseErrorToUser(e);
8282
})
8383
.finally(function () {
84+
// Override the default document title with appName. Check first for default
85+
// title, because user might have already customized the title in
86+
// index.ejs
87+
if (document.title === "Terria Map") {
88+
document.title = terria.appName;
89+
}
90+
8491
terria.loadInitSources().then((result) => result.raiseError(terria));
8592

8693
try {

0 commit comments

Comments
 (0)