Skip to content

Dependencies on length are displayed strangely #145

@phillipskevin

Description

@phillipskevin

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions