Skip to content

Commit 8e9ad83

Browse files
Update seeder.js
Added null check to allow insertion of null values
1 parent f69f80f commit 8e9ad83

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/seeder.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,8 @@ function fileExists(fileName) {
9696
*/
9797
function unmarshalBuffer(json) {
9898
_.forEach(json, function(value, key) {
99-
if (value.type==="Buffer") {
99+
// Null check to prevent creation of Buffer when value is null
100+
if (value !== null && value.type==="Buffer") {
100101
json[key]= new Buffer(value.data);
101102
}
102103
});

0 commit comments

Comments
 (0)