Skip to content

Commit

Permalink
chore: try to fix tests in older node versions
Browse files Browse the repository at this point in the history
  • Loading branch information
B4nan committed Nov 15, 2021
1 parent 53d4c39 commit 160cfc5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/metadata/MetadataDiscovery.ts
Expand Up @@ -40,7 +40,7 @@ export class MetadataDiscovery {
// ignore base entities (not annotated with @Entity)
const filtered = this.discovered.filter(meta => meta.name);
// sort so we discover entities first to get around issues with nested embeddables
filtered.sort((a, b) => !a.embeddable === !b.embeddable ? 0 : (a.embeddable ? 1 : -1));
filtered.sort((a, b) => !a.embeddable === !b.embeddable ? (filtered.indexOf(a) - filtered.indexOf(b)) : (a.embeddable ? 1 : -1));
filtered.forEach(meta => this.initSingleTableInheritance(meta, filtered));
filtered.forEach(meta => this.defineBaseEntityProperties(meta));
filtered.forEach(meta => this.metadata.set(meta.className, EntitySchema.fromMetadata(meta).init().meta));
Expand Down

0 comments on commit 160cfc5

Please sign in to comment.