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

ArraySchemas cannot be set from within a constructor #157

Open
Billnotic opened this issue Oct 1, 2023 · 0 comments
Open

ArraySchemas cannot be set from within a constructor #157

Billnotic opened this issue Oct 1, 2023 · 0 comments

Comments

@Billnotic
Copy link

Billnotic commented Oct 1, 2023

ArraySchemas cannot be set to other ArraySchema objects from within a constructor.

Eg.

var arraySchemaToSet = new ArraySchema<test>();
//code adding stuff to arraySchemaToSet
sampleTestSchema = new testSchema({
    sampleArraySchema: arraySchemaToSet
});

sampleTestSchema.sampleArraySchema would be empty, instead of being equal to arraySchemaToSet.
This appears to be a bug, setting the ArraySchema outside a constructor appears to work fine.

Eg.

var arraySchemaToSet = new ArraySchema<test>();
//code adding stuff to arraySchemaToSet
sampleTestSchema = new testSchema({
});
sampleTestSchema.sampleArraySchema = arraySchemaToSet;

sampleTestSchema.sampleArraySchema is correctly set to arraySchemaToSet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant