Skip to content

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

Open
kythyria wants to merge 1 commit into
josephg:masterfrom
kythyria:patch-1
Open

Make context.push() not break the context#390
kythyria wants to merge 1 commit into
josephg:masterfrom
kythyria:patch-1

Conversation

@kythyria
Copy link
Copy Markdown

@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