Skip to content

Commit

Permalink
Ensure desctructuring always passes
Browse files Browse the repository at this point in the history
  • Loading branch information
tsmith023 committed Jan 28, 2025
1 parent 0641412 commit 5540d78
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/collections/config/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,8 @@ class ConfigMapping {
`Expected exactly one vectorizer for ${key} named vector, got ${vectorizerNames.length}`
);
const vectorizerName = vectorizerNames[0];
const { properties, ...restA } = vectorizer[vectorizerName] as any;
const { vectorizeClassName, ...restB } = restA;
const { properties, ...restA } = vectorizer[vectorizerName] || ({} as any);
const { vectorizeClassName, ...restB } = restA || {};
out[key] = {
vectorizer: {
name: vectorizerName,
Expand Down

0 comments on commit 5540d78

Please sign in to comment.