Skip to content

Commit

Permalink
Re-include caching logic
Browse files Browse the repository at this point in the history
  • Loading branch information
thsparks committed Sep 24, 2024
1 parent 7799b36 commit 7b5a829
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions teachertool/src/transforms/loadReadableBlockName.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@ export async function loadBlockTextParts(blockId: string): Promise<pxt.editor.Bl
// Check for cached version.
let readableBlockName = getCachedBlockTextParts(blockId);
if (readableBlockName) {
// TODO thsparks : Uncomment after testing and verify this works.
// return Promise.resolve(readableBlockName);
return Promise.resolve(readableBlockName);
}

// Call into editor service & cache result
readableBlockName = await getBlockTextParts(blockId);
if (readableBlockName) {
// TODO thsparks : Uncomment after testing and verify this works.
// cacheBlockTextParts(blockId, readableBlockName);
cacheBlockTextParts(blockId, readableBlockName);
}

return readableBlockName;
Expand Down

0 comments on commit 7b5a829

Please sign in to comment.