mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-12 08:55:30 +00:00
Only clone this.targetPos when it's an object
When writing 55f2d356ff, I didn't know that `clone` only handles
objects. Now there is an extra path for `undefined`.
Fixes: #8951
This commit is contained in:
@@ -2284,7 +2284,7 @@ AttackPlan.prototype.Serialize = function()
|
||||
"isBlocked": this.isBlocked,
|
||||
"targetPlayer": this.targetPlayer,
|
||||
"target": this.target !== undefined ? this.target.id() : undefined,
|
||||
"targetPos": clone(this.targetPos),
|
||||
"targetPos": this.targetPos !== undefined ? clone(this.targetPos) : undefined,
|
||||
"uniqueTargetId": this.uniqueTargetId,
|
||||
"path": this.path,
|
||||
"unitCollUpdateArray": this.unitCollUpdateArray
|
||||
|
||||
Reference in New Issue
Block a user