Prevent errors in console during queue rearranging #1617
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Clicking and dragging a post in your queue to rearrange it (either in the queue "channel" page or in patio) generates a ghost post that will throw errors if our react data getters are called on it. Well, technically that's inaccurate; the thing that's created that would be accurately referred to as a "ghost" post is fine; the post that errors is the "fallback" post. Yes, I read the sortablejs readme; no it didn't make it at all clear to me which element is which. Whatever.
Anyway, this excludes the post in question from triggering
onNewPosts
handlers.Resolves #1070.
Testing steps
https://www.tumblr.com/blog/[blogname]/queue
. Confirm that no errors appear in the javascript console.