Skip to content

Commit 067ef16

Browse files
authored
fix a couple of blockly bugs in the code eval embed (#10588)
1 parent 5d7d64a commit 067ef16

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pxtblocks/layout.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ async function expandImagesAsync(xsg: Document): Promise<void> {
452452
const linkedSvgImages = images
453453
.filter(image => {
454454
const href = image.getAttribute("href");
455-
return href.endsWith(".svg") &&
455+
return href?.endsWith(".svg") &&
456456
(
457457
href.startsWith("/") ||
458458
href.startsWith(pxt.webConfig.cdnUrl)

webapp/src/blocks.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ export class Editor extends toolboxeditor.ToolboxEditor {
220220
this.loadingXml = true;
221221

222222
const flyout = this.editor.getFlyout() as pxtblockly.CachingFlyout;
223-
flyout.clearBlockCache();
223+
flyout?.clearBlockCache();
224224

225225
const loadingDimmer = document.createElement("div");
226226
loadingDimmer.className = "ui active dimmer";

0 commit comments

Comments
 (0)