Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: revert "Handle URL objects as column field values" #6145

Merged
merged 1 commit into from May 27, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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.