Skip to content

Commit

Permalink
Add object check before evaluating type or properties on object in fi…
Browse files Browse the repository at this point in the history
…eldsParser
  • Loading branch information
ryanhefner committed Oct 8, 2020
1 parent c507373 commit d1c42e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/parsers/fieldsParser.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ export function fieldsParser(
*/
function emptyModel(object) {
return !!(
typeof object === 'object'
object
&& typeof object === 'object'
&& object.hasOwnProperty('sys')
&& Object.keys(object).length === 1
);
Expand Down

0 comments on commit d1c42e8

Please sign in to comment.