Skip to content

Commit

Permalink
refactor: Use 'freeze()' to add parents to the API Elements tree
Browse files Browse the repository at this point in the history
  • Loading branch information
honzajavorek committed Aug 15, 2017
1 parent ea91dc6 commit 7f6f62e
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/parse.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ parse = (source, callback) ->

if apiElements
apiElements.unshift(warning) if warning
apiElements.freeze() # Adds 'parent' properties, prevents mutation
else
apiElements = null

Expand Down

0 comments on commit 7f6f62e

Please sign in to comment.