Skip to content

Commit

Permalink
Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerivec committed Dec 13, 2024
1 parent 12a5d98 commit 7b11ecd
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,13 +135,13 @@ export function removeExternalDefinitions(converterName?: string): void {
continue;
}

if ('zigbeeModel' in definition && definition.zigbeeModel) {
if (definition.zigbeeModel) {
for (const zigbeeModel of definition.zigbeeModel) {
removeFromExternalConvertersLookup(zigbeeModel, definition);
}
}

if ('fingerprint' in definition && definition.fingerprint) {
if (definition.fingerprint) {
for (const fingerprint of definition.fingerprint) {
removeFromExternalConvertersLookup(fingerprint.modelID, definition);
}
Expand All @@ -161,13 +161,13 @@ export function addDefinition(definition: IndexedDefinition): void {
externalDefinitionsCount++;
}

if ('fingerprint' in definition && definition.fingerprint) {
if (definition.fingerprint) {
for (const fingerprint of definition.fingerprint) {
addToExternalConvertersLookup(fingerprint.modelID, definition);
}
}

if ('zigbeeModel' in definition && definition.zigbeeModel) {
if (definition.zigbeeModel) {
for (const zigbeeModel of definition.zigbeeModel) {
addToExternalConvertersLookup(zigbeeModel, definition);
}
Expand Down

0 comments on commit 7b11ecd

Please sign in to comment.