fix: reset position for new items without text

This commit is contained in:
Anton Tranelis 2025-07-03 09:13:48 +02:00
parent 40a88c68fa
commit 8a0cd2a07b
2 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ export const SelectPosition = ({
</label>
<div className='tw:alert tw:bg-base-100 tw:text-base-content'>
<div>
{selectNewItemPosition && 'text' in selectNewItemPosition && (
{selectNewItemPosition && 'layer' in selectNewItemPosition && (
<span className='tw:text-lg'>
Select new position of <b>{selectNewItemPosition.name}</b> on the map!
</span>

View File

@ -69,7 +69,7 @@ function useSelectPositionManager(): {
})
setSelectPosition(null)
}
if ('text' in selectPosition) {
if ('layer' in selectPosition) {
// if selectPosition is an Item
const position =
mapClicked?.position.lng &&