1
0
Fork 0

Merge pull request #3964 from eriese/eriese-3957

fixes #3957 Re-use existing part for out-of-cycle draft
This commit is contained in:
Joost De Cock 2023-05-03 15:39:27 +02:00 committed by GitHub
commit 92a51ec163
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -113,7 +113,8 @@ PatternDrafter.prototype.__createPartForSet = function (partName, set = 0) {
}
// Create parts
this.activeStore.log.debug(`📦 Creating part \`${partName}\` (set ${set})`)
this.pattern.parts[set][partName] = this.__createPartWithContext(partName, set)
this.pattern.parts[set][partName] =
this.pattern.parts[set][partName] || this.__createPartWithContext(partName, set)
// Handle inject/inheritance
const parent = this.pattern.config.inject[partName]