Skip to content

Commit

Permalink
Fix a issue not to merge the new translated APIs desc. to fallback AP…
Browse files Browse the repository at this point in the history
…Is desc.
  • Loading branch information
JeongJun-Lee committed Dec 28, 2024
1 parent bf29eb8 commit af7dee9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mu/modes/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,10 +383,10 @@ def merge_apis(self, fallback_apis, locale_apis):
for locale_api in locale_apis:
func_name = locale_api.split('(')[0]
for idx, data in enumerate(fallback_apis):
if func_name in data:
if func_name in data: # Replace the previous
fallback_apis[idx] = locale_api
break
if data[0] == len(fallback_apis) - 1: # new api
if idx == len(fallback_apis) - 1: # Add new api
fallback_apis.append(locale_api)
return fallback_apis

Expand Down

0 comments on commit af7dee9

Please sign in to comment.