Skip to content

Commit

Permalink
cherry pick #9886 (#9909)
Browse files Browse the repository at this point in the history
  • Loading branch information
riknoll authored Mar 6, 2024
1 parent 482e69a commit 5156916
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pxtblocks/fields/field_asset.ts
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,7 @@ namespace pxtblockly {

protected parseValueText(newText: string) {
newText = pxt.Util.htmlUnescape(newText);
if (this.sourceBlock_ && !this.sourceBlock_.isInFlyout) {
if (this.sourceBlock_) {
const project = pxt.react.getTilemapProject();

const id = this.getBlockData();
Expand Down
2 changes: 2 additions & 0 deletions pxtblocks/fields/field_tilemap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ namespace pxtblockly {
const existing = pxt.lookupProjectAssetByTSReference(newText, project);
if (existing) return existing;

if (this.sourceBlock_?.isInFlyout) return undefined;

const tilemap = pxt.sprite.decodeTilemap(newText, "typescript", project) || project.blankTilemap(this.params.tileWidth, this.params.initWidth, this.params.initHeight);
let newAsset: pxt.ProjectTilemap;

Expand Down

0 comments on commit 5156916

Please sign in to comment.