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

Dependencies on length are displayed strangely #145

Open
Tracked by #4321
phillipskevin opened this issue Sep 6, 2018 · 0 comments
Open
Tracked by #4321

Dependencies on length are displayed strangely #145

phillipskevin opened this issue Sep 6, 2018 · 0 comments
Labels

Comments

@phillipskevin
Copy link
Contributor

I'm not positive this issue is caused by can-reflect, but canReflect.getKeyDependencies is the lowest level place I've narrowed it down to.

When a property depends on the length of another property it is displayed strangely. This code:

ViewModel: {
	numbers: {
		default() {
			return [1, 2, 3, 4, 5, 6];
		}
	},

	get oddNumbers() {
		return this.numbers.reduce((odds, num) => {
			if (num % 2 === 1) {
				odds.push(num);
			}
			return odds;
		}, []);
	}
}

...returns this graph:
image

This should somehow be tied to numbers.length.

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

2 participants