[SERVER-8048] Object.create(null) throws Created: 29/Dec/12 Updated: 11/Jul/16 Resolved: 17/Jan/13 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | JavaScript |
| Affects Version/s: | 2.3.2 |
| Fix Version/s: | 2.4.0-rc0 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Aaron Heckmann | Assignee: | Ben Becker |
| Resolution: | Done | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
osx 10.7.5 |
||
| Issue Links: |
|
||||
| Operating System: | ALL | ||||
| Steps To Reproduce: | see description |
||||
| Participants: | |||||
| Description |
throws exception:
|
| Comments |
| Comment by auto [ 16/Jan/13 ] | |
|
Author: {u'date': u'2013-01-16T23:49:20Z', u'email': u'ben.becker@10gen.com', u'name': u'Ben Becker'}Message: | |
| Comment by Ben Becker [ 16/Jan/13 ] | |
|
Objects with a null prototypes won't have the 'hasOwnProperty' method, so I think the best work-around here is to simply add a check in utils.js for Object._proto_ === null. This doesn't fix autocomplete, but I think the exception we throw when trying to auto-complete is slightly more acceptable (given the nature of the problem):
|