Open mbruning24 opened 6 years ago
@mbruning24 I would like to work on the issue and have already fixed it, the only thing is that I want to introduce the fix as a feature. An issue that is related to the same is raised here #169 . The issue #169 will come when you add the condition above, I have fixed both issues in a configurable way. I have also mentioned the same on gitter. Let me know if I can work on this Thanks.
Actual Behaviour
Seed does not support objects with a top-level property that has a null value.
{ a: '1', b: null }
does not work{ a: '1', b: '2' }
works Note nested null values work ({ a: '1', b: { c: '2', d: null } }
works)Expected Behaviour
Seed objects should allow for the "null" value in a top-level property.
Steps to reproduce it
{ a: '1', b: null }
)cannot read property 'type' of null
errorLogCat for the issue
I removed local filesystem prefixes,
____
is the project directoryScreenshots of the issue
N/A
Would you like to work on the issue?
In src/seeder.js you should just be able to add a null check to the unmarshalBuffer function on line 99:
if (value !== null && value.type==="Buffer")
instead ofif (value.type==="Buffer")
I won't have time to work on it, but I know this works with the cases I have.