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

Merged
merged 1 commit into from Apr 16, 2013

Conversation

Projects
None yet
2 participants
@schovi
Contributor

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

This comment has been minimized.

Show comment
Hide comment
@schovi

schovi Mar 31, 2013

Contributor

This can partitionaly fix and improve #339

Contributor

schovi commented Mar 31, 2013

This can partitionaly fix and improve #339

daffl added a commit that referenced this pull request Apr 16, 2013

Merge pull request #341 from schovi/can-sub-remove-fix
can.sub fix remove param. Allow only to remove properties + tests

@daffl daffl merged commit e7e335b into canjs:master Apr 16, 2013

1 check passed

default The Travis build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment