Skip to content

Commit

Permalink
fix: duplicate dictionary in config file (#1886)
Browse files Browse the repository at this point in the history
* fix: duplicate dictionary in config file

* [autofix.ci] apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
  • Loading branch information
xiaoyifang and autofix-ci[bot] authored Nov 1, 2024
1 parent 19bcd94 commit 8a92cbf
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/instances.cc
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ Group::Group( Config::Group const & cfgGroup,
for ( auto const & dict : cfgGroup.dictionaries ) {
std::string const dictId = dict.id.toStdString();

if ( dictMap.contains( dictId ) ) {
//avoid duplicate dictionary in groups in config file.
if ( dictMap.contains( dictId ) && !dictOrderList.contains( dictId ) ) {
groupDicts.insert( dictId, dictMap[ dictId ] );
dictOrderList.push_back( dictId );
}
Expand Down

0 comments on commit 8a92cbf

Please sign in to comment.