Skip to content

Commit

Permalink
Merge pull request #457 from roto-ronttonen/fix-recursive-field-mask-…
Browse files Browse the repository at this point in the history
…search

Fix recursiveFieldMaskSearch
  • Loading branch information
avermeil authored Sep 9, 2024
2 parents 46d3b22 + 82af846 commit ae00f98
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export function recursiveFieldMaskSearch(data: Record<string, any>): string[] {
}
const fieldKey = toSnakeCase(key);
const value = data[key];
if (typeof value === "object" && !Array.isArray(value)) {
if (typeof value === "object" && !Array.isArray(value) && value !== null) {
const children = recursiveFieldMaskSearch(value);
for (const child of children) {
paths.push(`${fieldKey}.${child}`);
Expand Down

0 comments on commit ae00f98

Please sign in to comment.