Skip to content

Instantly share code, notes, and snippets.

@kadams54
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kadams54/d04ca02e2ccf4005a03a to your computer and use it in GitHub Desktop.
Save kadams54/d04ca02e2ccf4005a03a to your computer and use it in GitHub Desktop.

Currently

We walk a subtree (why?) of the hiearchy; everything below the passed-in record. If any nodes in the tree have an onParentResults handler, we call it.

Ideally

We walk the entire changeset. If any records in the changeset have an onParentResults handler and the passed-in record's ID in the parents array, we call the handler. Note that the parent check is part of the current logic, so that's not really a change. With that said, it is much more important if we're not walking a tree, in that it's the only thing ensuring that the changeset record is an ancestor of the one being changed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment