mirror of
https://github.com/BlueMap-Minecraft/BlueMap.git
synced 2024-11-24 11:38:37 +01:00
Allow only providing the map-id in the page-adress, fixes: #589
This commit is contained in:
parent
48fa5b6abc
commit
074bbc3d0f
@ -710,6 +710,18 @@ export class BlueMapApp {
|
||||
let hash = window.location.hash?.substring(1) || this.settings.startLocation || "";
|
||||
let values = hash.split(":");
|
||||
|
||||
// only world is provided
|
||||
if (values.length === 1 && (!this.mapViewer.map || this.mapViewer.map.data.id !== values[0])) {
|
||||
try {
|
||||
await this.switchMap(values[0]);
|
||||
} catch (e) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
// load full location
|
||||
if (values.length !== 10) return false;
|
||||
|
||||
let controls = this.mapViewer.controlsManager;
|
||||
|
Loading…
Reference in New Issue
Block a user