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

Make context.push() not break the context #390

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Make context.push() not break the context #390

wants to merge 1 commit into from

Conversation

kythyria
Copy link

@kythyria kythyria commented Sep 3, 2015

Previously, context.push() was altering the context's path to include the new item. Consequently, the path would point to a different place to where callers expected. This also meant it worked exactly once, and any subsequent operations would be incorrect or even fail (pushes fail).

By cloning the path first, the context is maintained as pointing to the same place.

Previously, context.push() was altering the context's path to include the new item. Consequently, the path would point to a different place to where callers expected. This also meant it worked exactly once, and any subsequent operations would be incorrect or even fail (pushes fail).

By cloning the path first, the context is maintained as pointing to the same place.
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.

1 participant