mirror of
https://github.com/thepeacockproject/Peacock
synced 2025-02-16 16:34:28 +01:00
Fix SMF adding contracts to a location that has no contracts yet (#380)
This commit is contained in:
parent
cf6505ca9a
commit
0585b35447
@ -120,9 +120,8 @@ export class SMFSupport {
|
||||
const id = contractData.Metadata.Id
|
||||
const placeBefore = contractData.SMF?.destinations.placeBefore
|
||||
const placeAfter = contractData.SMF?.destinations.placeAfter
|
||||
const inLocation = this.controller.missionsInLocations[
|
||||
location
|
||||
] as string[]
|
||||
const inLocation = (this.controller.missionsInLocations[location] ??
|
||||
(this.controller.missionsInLocations[location] = [])) as string[]
|
||||
|
||||
if (placeBefore) {
|
||||
const index = inLocation.indexOf(placeBefore)
|
||||
|
Loading…
Reference in New Issue
Block a user