File tree Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Expand file tree Collapse file tree 1 file changed +7
-5
lines changed Original file line number Diff line number Diff line change 11'use strict' ;
22
3+ var hasOwnProperty = Object . prototype . hasOwnProperty ;
4+
35/**
46 * @param {Array<Object> } comments an array of parsed comments
57 * @returns {Array<Object> } nested comments, with only root comments
@@ -9,8 +11,8 @@ module.exports = function (comments) {
911 var id = 0 ,
1012 root = {
1113 members : {
12- instance : { } ,
13- static : { }
14+ instance : Object . create ( null ) ,
15+ static : Object . create ( null )
1416 }
1517 } ;
1618
@@ -44,12 +46,12 @@ module.exports = function (comments) {
4446 scope = segment [ 0 ] ,
4547 name = segment [ 1 ] ;
4648
47- if ( ! node . members [ scope ] . hasOwnProperty ( name ) ) {
49+ if ( ! hasOwnProperty . call ( node . members [ scope ] , name ) ) {
4850 node . members [ scope ] [ name ] = {
4951 comments : [ ] ,
5052 members : {
51- instance : { } ,
52- static : { }
53+ instance : Object . create ( null ) ,
54+ static : Object . create ( null )
5355 }
5456 } ;
5557 }
You can’t perform that action at this time.
0 commit comments