Skip to content

Commit

Permalink
Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Nerivec committed Dec 18, 2024
1 parent 0b700f6 commit 543274d
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 543274d

Please sign in to comment.