mirror of
https://github.com/simstudioai/sim.git
synced 2026-09-24 15:45:35 +08:00
Prevent dragging into other blocks for connection block
This commit is contained in:
@@ -34,7 +34,10 @@ export function ShortInput({
|
||||
e.preventDefault()
|
||||
try {
|
||||
const data = JSON.parse(e.dataTransfer.getData('application/json'))
|
||||
if (data.type === 'connectionBlock') {
|
||||
if (
|
||||
data.type === 'connectionBlock' &&
|
||||
data.connectionData.sourceBlockId === blockId
|
||||
) {
|
||||
const currentValue = value?.toString() ?? ''
|
||||
const newValue =
|
||||
currentValue +
|
||||
|
||||
Reference in New Issue
Block a user