Skip to content

Commit

Permalink
Check definition name before accepting translation (#9502) (#9611)
Browse files Browse the repository at this point in the history
* check definition name before accepting translation

* fix build error

Co-authored-by: Kim Ying <[email protected]>
  • Loading branch information
jwunderl and kimprice authored Jul 20, 2023
1 parent 75d10b7 commit c7dbb80
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions pxtlib/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -798,8 +798,9 @@ namespace ts.pxtc {
const bParam = b.actualNameToParam[aParam.actualName];
if (!bParam
|| aParam.type != bParam.type
|| aParam.shadowBlockId != bParam.shadowBlockId) {
pxt.debug(`Parameter ${aParam.actualName} type or shadow block does not match after localization`);
|| aParam.shadowBlockId != bParam.shadowBlockId
|| aParam.definitionName != bParam.definitionName) {
pxt.debug(`Parameter ${aParam.actualName} type, shadow block, or definition name does not match after localization`);
return false;
}
}
Expand Down

0 comments on commit c7dbb80

Please sign in to comment.