Skip to content

Commit

Permalink
Fix findMissingStringProps
Browse files Browse the repository at this point in the history
- Don't treat an array like an object
  • Loading branch information
JiriLojda committed Sep 20, 2023
1 parent 4d58e6f commit aa9c3f9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shared/utils/findMissingStringProps.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ import { hasStringProperty } from "./typeguards";

export const findMissingStringProps =
(expectedProps: ReadonlyArray<string>) => (body: Record<string, unknown> | null): ReadonlyArray<string> =>
Object.keys(expectedProps)
expectedProps
.filter(key => !hasStringProperty(key, body));

0 comments on commit aa9c3f9

Please sign in to comment.