Merge pull request #4893 from tk0miya/4885_jsdomain_crashed_with_duplicated_objects

Fix #4885: jsdomain also crashed with duplicated objects
This commit is contained in:
Takeshi KOMIYA 2018-04-25 23:03:31 +09:00 committed by GitHub
commit 8509c1df1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

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

View File

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