Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix: revert fix handle URL objects as column field values (#6145)
This reverts commit 50a0641.
  • Loading branch information
pleerock committed May 27, 2020
1 parent b4a29f4 commit e073e02
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 68 deletions.
7 changes: 2 additions & 5 deletions src/util/OrmUtils.ts
@@ -1,5 +1,4 @@
import { ObjectLiteral } from "../common/ObjectLiteral";
import { URL } from "url";

export class OrmUtils {

Expand Down Expand Up @@ -83,8 +82,7 @@ export class OrmUtils {
&& !(value instanceof Set)
&& !(value instanceof Date)
&& !(value instanceof Buffer)
&& !(value instanceof RegExp)
&& !(value instanceof URL)) {
&& !(value instanceof RegExp)) {
if (!target[key])
Object.assign(target, { [key]: Object.create(Object.getPrototypeOf(value)) });
this.mergeDeep(target[key], value);
Expand Down Expand Up @@ -214,8 +212,7 @@ export class OrmUtils {
(x instanceof Date && y instanceof Date) ||
(x instanceof RegExp && y instanceof RegExp) ||
(x instanceof String && y instanceof String) ||
(x instanceof Number && y instanceof Number) ||
(x instanceof URL && y instanceof URL))
(x instanceof Number && y instanceof Number))
return x.toString() === y.toString();

// At last checking prototypes as good as we can
Expand Down
24 changes: 0 additions & 24 deletions test/github-issues/5762/entity/User.ts

This file was deleted.

39 changes: 0 additions & 39 deletions test/github-issues/5762/issue-5762.ts

This file was deleted.

0 comments on commit e073e02

Please sign in to comment.