Skip to content

Commit 89442a7

Browse files
authored
fix constantshim blocks (#10618)
1 parent 69b6528 commit 89442a7

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

pxtcompiler/emitter/decompiler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1193,7 +1193,7 @@ ${output}</xml>`;
11931193
return r;
11941194
}
11951195

1196-
let value = U.htmlEscape(attributes.blockId || callInfo.qName);
1196+
let value = U.htmlEscape(attributes.blockId) || callInfo.qName;
11971197

11981198
const [parent,] = getParent(n);
11991199
const parentCallInfo: pxtc.CallInfo = parent && pxtInfo(parent).callInfo;

pxtlib/service.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,8 @@ namespace ts.pxtc {
592592
&& s.kind != pxtc.SymbolKind.EnumMember
593593
&& s.kind != pxtc.SymbolKind.Module
594594
&& s.kind != pxtc.SymbolKind.Interface
595-
&& s.kind != pxtc.SymbolKind.Class) {
595+
&& s.kind != pxtc.SymbolKind.Class
596+
&& !s.attributes.blockIdentity) {
596597
if (!s.attributes.blockId)
597598
s.attributes.blockId = s.qName.replace(/\./g, "_")
598599
if (s.attributes.block == "true") {

0 commit comments

Comments
 (0)