Skip to content

Commit

Permalink
Added undefined check on set() in Serialiser
Browse files Browse the repository at this point in the history
  • Loading branch information
marziply committed Aug 31, 2021
1 parent 598481e commit 6f3fad5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/serialiser.js
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,9 @@ export default class Serialiser {
* @returns {void}
*/
set (parent, key, value) {
parent[key.name] = value
if (typeof value !== 'undefined') {
parent[key.name] = value
}
}

result = {}
Expand Down

0 comments on commit 6f3fad5

Please sign in to comment.