Fix #4885: jsdomain also crashed with duplicated objects

This commit is contained in:
Takeshi KOMIYA 2018-04-24 01:09:34 +09:00
parent 7a13a5996b
commit d2ed2d4c4c
2 changed files with 2 additions and 2 deletions

View File

@ -16,7 +16,7 @@ Features added
Bugs fixed
----------
* #4885, #4887: py domain: Crashed with duplicated objects
* #4885, #4887: domains: Crashed with duplicated objects
Testing
--------

View File

@ -262,7 +262,7 @@ class JSModule(Directive):
if mod_name in modules:
self.state_machine.reporter.warning(
'duplicate module description of %s, ' % mod_name +
'other instance in ' + self.env.doc2path(modules[mod_name]),
'other instance in ' + env.doc2path(modules[mod_name]),
line=self.lineno)
env.domaindata['js']['modules'][mod_name] = env.docname
# Make a duplicate entry in 'objects' to facilitate searching for