Skip to content

Commit

Permalink
fix: handle null values (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
gr2m authored May 2, 2021
1 parent e35731e commit 18e8b91
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export function protectionResponseDataToUpdateParameters(data) {
const parameters = mapValues(data, (key, value) => {
if (/(^|_)url$/.test(key)) return;
if (Array.isArray(value)) return value;
if (typeof value !== "object") return value;
if (value === null || typeof value !== "object") return value;

if ("enabled" in value) return value.enabled;
if ("login" in value) return value.login;
Expand Down

0 comments on commit 18e8b91

Please sign in to comment.