fix: do not show "Attache to my account" button if no logged in user

This commit is contained in:
Yohan Boniface 2024-09-09 18:46:59 +02:00
parent 445127254b
commit eda1223516

View file

@ -117,7 +117,7 @@ export class MapPermissions {
const builder = new U.FormBuilder(this, fields)
const form = builder.build()
container.appendChild(form)
if (this.isAnonymousMap() && this.map.options.user) {
if (this.isAnonymousMap() && this.map.options.user?.id) {
// We have a user, and this user has come through here, so they can edit the map, so let's allow to own the map.
// Note: real check is made on the back office anyway.
const advancedActions = DomUtil.createFieldset(