mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-08-15 14:43:32 -07: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:
parent
99bbc24265
commit
2c44b5301c
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue