Skip to content

Commit 1ab402f

Browse files
authored
My-Blocks-Plus.js -- fix global procedures not properly re-caching
1 parent 2509c44 commit 1ab402f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

extension-code/My-Blocks-Plus.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1225,7 +1225,7 @@
12251225
}
12261226
const oldPopProcCache = Blocks.prototype.populateProcedureCache;
12271227
Blocks.prototype.populateProcedureCache = function() {
1228-
if (this._cache.proceduresPopulated) return;
1228+
if (this.isMbpPopulated) return;
12291229
refreshGlobalBlocksCache();
12301230
oldPopProcCache.call(this);
12311231
for (const proccode of Object.keys(globalBlocksCache)) {
@@ -1236,6 +1236,7 @@
12361236
this._cache.procedureParamNames[proccode] = target.blocks._cache.procedureParamNames[proccode];
12371237
this._cache.procedureDefinitions[proccode] = target.blocks._cache.procedureDefinitions[proccode];
12381238
}
1239+
this.isMbpPopulated = true;
12391240
};
12401241
const oldGetInputs = Blocks.prototype.getInputs;
12411242
Blocks.prototype.getInputs = function(block) {

0 commit comments

Comments
 (0)