Skip to content

Commit

Permalink
fix(react-native-mlkit-object-detection): infinite render caused by d…
Browse files Browse the repository at this point in the history
…efault value (#182)
  • Loading branch information
aiden-petersen authored Feb 4, 2025
1 parent c5538d1 commit a56a585
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,10 @@ type Models<T extends Record<string, any>> = {
[K in keyof T | "default"]: RNMLKitObjectDetector;
};

const assetsDefaultValue = {};

export function useObjectDetectionModels<T extends AssetRecord>({
assets = {} as T,
assets = assetsDefaultValue as T,
loadDefaultModel,
defaultModelOptions,
}: {
Expand Down

0 comments on commit a56a585

Please sign in to comment.