mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-20 10:12:18 +00:00
fix(share): a bare address starts with the default layers
Layer choices saved in local storage were restored whenever the address carried no link, so clearing the address and loading the bare URL brought the last session's layers back and there was no way to a reset view. Start-up no longer reads them: a link restores what its hash carries, and a bare address starts from the defaults.
This commit is contained in:
1 parent
bcc25be07a
commit
db1736266b
2 files changed
+11
-8
No files matched your search
@@ -417,9 +417,10 @@ export class ShareRestoration {
|
||||
this._layerStateRestorePromise = this._layerStateCoordinator.start({
|
||||
shareLayerState: this._initialShareState?.layerState || null,
|
||||
shareCreatedAtMs: this._initialShareState?.sharedAtMs ?? null,
|
||||
// Any valid camera/style share isolates recipient-local preferences,
|
||||
// including legacy and malformed-v2 layer payloads.
|
||||
allowLocalState: !this._initialShareState,
|
||||
// A link restores what it carries; a bare address is a clean start
|
||||
// with the default layers. Saved layer choices never come back on
|
||||
// their own, so clearing the address always resets the view.
|
||||
allowLocalState: false,
|
||||
});
|
||||
if (this._initialShareSelectionSuperseded) {
|
||||
this._layerStateCoordinator.cancelPendingShareTracking(
|
||||
|
||||
Reference in new issue
Block a user