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

Calling an embedded trait twice will fail. #14

Open
blakewest opened this issue Jan 6, 2015 · 0 comments
Open

Calling an embedded trait twice will fail. #14

blakewest opened this issue Jan 6, 2015 · 0 comments
Labels

Comments

@blakewest
Copy link
Contributor

Given the following factory...

Replicator.define('membership', {
  meta: Replicator.embed('membershipMeta', {coveredMembership: true})
}
and
Replicator.define('membershipMeta', {
  reg_fee: {editable: true}
 }
  .trait('coveredMembership', {
  reg_fee: {editable: false}
}

If you do something like...

  var membershipFactory = Replicator.makeFactory('membership');
  membershipFactory({coveredMembership: true}); // membership.meta.reg_fee.editable === false;
  membershipFactory({coveredMembership: true}); // membership.meta.reg_fee.edtiable === true;

I would expect them both to return the same thing when run twice.

@blakewest blakewest added the bug label Jan 6, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant