Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Override default title with appName on app start. #700

Merged
merged 1 commit into from
Oct 21, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,13 @@ module.exports = terria
terria.raiseErrorToUser(e);
})
.finally(function () {
// Override the default document title with appName. Check first for default
// title, because user might have already customized the title in
// index.ejs
if (document.title === "Terria Map") {
document.title = terria.appName;
}

terria.loadInitSources().then((result) => result.raiseError(terria));

try {
Expand Down
Loading