-
Type: Bug
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: 1.39.1, 1.39.2
-
Component/s: None
-
None
-
Environment:OS: Windows 10
node.js / npm versions:
Additional info: Compass 1.39.1
-
Not Needed
Problem Statement/Rationale
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]".
Please be sure to attach relevant logs with any sensitive data redacted.
How to retrieve logs for: Compass; Shell
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.
Steps to Reproduce
- 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.
Expected Results
The new pending field value is "[object Object]".
Actual Results
The new pending field value is "".
Additional Notes
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.