summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--objects.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/objects.js b/objects.js
index b8965b4..1b7027f 100644
--- a/objects.js
+++ b/objects.js
@@ -1675,7 +1675,7 @@ SpriteMorph.prototype.blockTemplates = function (category) {
new VariableDialogMorph(
null,
function (pair) {
- if (pair) {
+ if (pair && !myself.variables.silentFind(pair[0])) {
myself.addVariable(pair[0], pair[1]);
myself.toggleVariableWatcher(pair[0], pair[1]);
myself.blocksCache[cat] = null;
@@ -3796,7 +3796,7 @@ StageMorph.prototype.blockTemplates = function (category) {
new VariableDialogMorph(
null,
function (pair) {
- if (pair) {
+ if (pair && !myself.variables.silentFind(pair[0])) {
myself.addVariable(pair[0], pair[1]);
myself.toggleVariableWatcher(pair[0], pair[1]);
myself.blocksCache[cat] = null;