This commit is contained in:
Stephan Richter
2021-01-15 10:36:24 +01:00
parent 3cd72cffb6
commit f8a9c86a0e
2 changed files with 5 additions and 2 deletions

View File

@@ -165,7 +165,10 @@ function moveTile(x,y){
}
function place(data){
$('#'+$(data).attr('id')).replaceWith(data);
var elem = $('#'+$(data).attr('id'));
if (elem.length) {
elem.replaceWith(data);
} else $('#scroll').append(data);
return false;
}