Updating hooks break when keys have a `.`. #966
Closed
Labels
Comments
dfahlander
added a commit
that referenced
this issue
Sep 29, 2020
…hat contain dotted strings (#1130) * Cleanup: ensure db.folks update hook is removed after unit test completes * Do not extract nested paths from the object keys contained in middleware hook return values Fixes #966 * Additional test for #1130 * Nit: trailing space * Post-merge fixup * Add explicit check for keys as literal property names on objects before intepreting them as paths * Alternative approach: push logic down into setByKeyPath function * Revert "Alternative approach: push logic down into setByKeyPath function" This reverts commit d610245. Co-authored-by: dfahlander <david.fahlander@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://codesandbox.io/s/vigilant-knuth-e7dme
This code updates a key called
is.good.friend
, while a hook simply spreads the modifications object. The result is an object with is.good.friend as an object path.The text was updated successfully, but these errors were encountered: