Minor - P4
OS: Windows 10
node.js / npm versions:
Additional info: Compass 1.39.1
When I type a string literal into the document update box, I expect that the string will accept any valid Unicode input. However, typing "[object Object]" will reset the field to an empty string when the closing brace is typed.
Prior to typing the closing brace, this is what the text looks like.
After typing the final closing brace, the string becomes empty. I can do this again by typing "[object Object]" again, even without closing the edit document window or without restarting the application. When update is clicked, the empty string is saved to the document.
Other similar strings do not have this behavior. Examples are "", "[foobar]", and "[object Objects]".
After checking the logs, I don't see anything relevant, since the actions taken involve keypresses without sending the update. Please contact me if you have trouble reproducing.
- Open a collection with at least one document with a string field.
- Double click on the string value to enter "Edit Document" mode.
- Type "[object Object]" (no quotes) into the field.
The new pending field value is "[object Object]".
The new pending field value is "".
While this is an odd document modification, it is something I was required to do to test a script to fix broken data. I am unaware if there are any other magic strings that cause similar problems.