Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 22 additions & 15 deletions KiCad_BOM_Wizard.js
Original file line number Diff line number Diff line change
Expand Up @@ -322,12 +322,15 @@ function ExtractAndGenerateDataForThePart () {
UserProjectNetData.export.components[0].comp.forEach(function (Part) {
if (Part.fields) {
Part.fields.forEach(function (value) {
value.field.forEach(function (value) {
if (ListOfFields.indexOf(value.$.name) === -1) {
// if the returned index is -1 then we know that we know we don't have this item
ListOfFields.push(value.$.name)
}
})
if(value.field){
value.field.forEach(function (value) {
if (ListOfFields.indexOf(value.$.name) === -1) {
// if the returned index is -1 then we know that we know we don't have this item
ListOfFields.push(value.$.name)
}
})
}

})
}
})
Expand All @@ -338,9 +341,11 @@ function ExtractAndGenerateDataForThePart () {

if (Part.fields) {
Part.fields.forEach(function (value) {
value.field.forEach(function (value) {
TempFieldHolder[value.$.name] = value['_']
})
if(value.field){
value.field.forEach(function (value) {
TempFieldHolder[value.$.name] = value['_']
})
}
})
}

Expand All @@ -365,12 +370,14 @@ function ExtractAndGenerateDataForThePart () {

if (Part.fields) {
Part.fields.forEach(function (value) {
value.field.forEach(function (value) {
if (ListOfFields.indexOf(value.$.name) === -1) {
// if the returned index is -1 then we know that we know we don't have this item
ListOfFields.push(value.$.name)
}
})
if(value.field){
value.field.forEach(function (value) {
if (ListOfFields.indexOf(value.$.name) === -1) {
// if the returned index is -1 then we know that we know we don't have this item
ListOfFields.push(value.$.name)
}
})
}
})
}

Expand Down