Skip to content

Commit

Permalink
fix some of the tests
Browse files Browse the repository at this point in the history
  • Loading branch information
imnotjames committed Jun 21, 2021
1 parent f527fee commit 2d959d0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/persistence/SubjectExecutor.ts
Expand Up @@ -551,7 +551,7 @@ export class SubjectExecutor {

// for mongodb we have a bit different updation logic
if (this.queryRunner instanceof MongoQueryRunner) {
const partialEntity = OrmUtils.mergeDeep({}, subject.entity!);
const partialEntity = OrmUtils.mergeDeep({}, subject.entity);
if (subject.metadata.objectIdColumn && subject.metadata.objectIdColumn.propertyName) {
delete partialEntity[subject.metadata.objectIdColumn.propertyName];
}
Expand Down Expand Up @@ -631,7 +631,7 @@ export class SubjectExecutor {

// for mongodb we have a bit different updation logic
if (this.queryRunner instanceof MongoQueryRunner) {
const partialEntity = OrmUtils.mergeDeep({}, subject.entity!);
const partialEntity = OrmUtils.mergeDeep({}, subject.entity);
if (subject.metadata.objectIdColumn && subject.metadata.objectIdColumn.propertyName) {
delete partialEntity[subject.metadata.objectIdColumn.propertyName];
}
Expand Down
2 changes: 1 addition & 1 deletion src/util/OrmUtils.ts
Expand Up @@ -104,7 +104,7 @@ export class OrmUtils {
}

/**
* Deep Object.assign for simple objects.
* Deep Object.assign.
*/
static mergeDeep(target: any, ...sources: any[]): any {
if (!sources.length) {
Expand Down

0 comments on commit 2d959d0

Please sign in to comment.