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

can.sub fix remove param. Allow only to remove properties + tests #341

Merged
merged 1 commit into from
Apr 16, 2013
Merged

can.sub fix remove param. Allow only to remove properties + tests #341

merged 1 commit into from
Apr 16, 2013

Conversation

schovi
Copy link
Contributor

@schovi schovi commented Mar 31, 2013

Fix can.sub remove param.

Because now the remove param propagate into can.getObject as undefined or negate of given value you will get this weird behaviour when pass anything else than undefined or true into remove param.

obj = {}
can.sub("{a}", obj, false) // -> [{}, ""]
obj // -> {a: {}}

This will trigger adding functionality inside can.getObject

@schovi
Copy link
Contributor Author

schovi commented Mar 31, 2013

This can partitionaly fix and improve #339

daffl added a commit that referenced this pull request Apr 16, 2013
can.sub fix remove param. Allow only to remove properties + tests
@daffl daffl merged commit e7e335b into canjs:master Apr 16, 2013
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

Successfully merging this pull request may close these issues.

2 participants