Skip to content

Commit 7de015e

Browse files
committed
fix: entity construction use only defined values
1 parent 1403c92 commit 7de015e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@juneil/entityts",
3-
"version": "1.2.1",
3+
"version": "1.2.2",
44
"description": "EntityTS - Typescript library for entities, create entities for validation",
55
"main": "index.js",
66
"scripts": {

src/lib/entity.ts

+1
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ export class BaseEntity {
8282
}
8383
[]
8484
.concat(Object.keys(result.value))
85+
.filter(_ => result.value[_] !== undefined)
8586
.forEach((_: string) => Reflect.set(this, _, result.value[_]))
8687
}
8788

0 commit comments

Comments
 (0)