Commit 78503c15 authored by nanahira's avatar nanahira

fix

parent aae55f37
......@@ -22,14 +22,14 @@ function applyMixin(
}
visited.add(sourceClass);
Object.getOwnPropertyNames(sourceClass.prototype).forEach((name) => {
if (mixedClass.prototype[name] != null) {
if (mixedClass.prototype[name] == null) {
mixedClass.prototype[name] = sourceClass.prototype[name];
}
});
const schemaKeys = reflector.getArray('SchemaMetaKey', sourceClass);
for (const name of schemaKeys) {
const schemaMeta = reflector.get('SchemaMeta', sourceClass, name);
if (!schemaMeta == null) {
if (schemaMeta == null) {
continue;
}
const existingMetadata = reflector.get('SchemaMeta', mixedClass, name);
......
......@@ -11,11 +11,13 @@ export class Sleeve {
}
}
@RegisterSchema()
class Dress {
class WearingWithSleeves {
@SchemaProperty({ type: Sleeve })
sleeves: Sleeve[];
}
@RegisterSchema()
class Dress extends WearingWithSleeves {
@SchemaProperty()
color: string;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment