From 97a9b378438eb1fb9d1d9feed3dad353c3f2aca2 Mon Sep 17 00:00:00 2001 From: Florrie Date: Tue, 1 May 2018 13:58:09 -0300 Subject: [PATCH] Remove doNothing methods --- src/blocks/scratch3_looks.js | 8 +++----- src/blocks/scratch3_sensing.js | 4 +--- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/blocks/scratch3_looks.js b/src/blocks/scratch3_looks.js index 93226aee1..aaaad388d 100644 --- a/src/blocks/scratch3_looks.js +++ b/src/blocks/scratch3_looks.js @@ -244,7 +244,7 @@ class Scratch3LooksBlocks { looks_thinkforsecs: this.thinkforsecs, looks_show: this.show, looks_hide: this.hide, - looks_hideallsprites: this.doNothing, + looks_hideallsprites: () => {}, // legacy no-op block looks_switchcostumeto: this.switchCostume, looks_switchbackdropto: this.switchBackdrop, looks_switchbackdroptoandwait: this.switchBackdropAndWait, @@ -255,8 +255,8 @@ class Scratch3LooksBlocks { looks_cleargraphiceffects: this.clearEffects, looks_changesizeby: this.changeSize, looks_setsizeto: this.setSize, - looks_changestretchby: this.doNothing, - looks_setstretchto: this.doNothing, + looks_changestretchby: () => {}, // legacy no-op blocks + looks_setstretchto: () => {}, looks_gotofrontback: this.goToFrontBack, looks_goforwardbackwardlayers: this.goForwardBackwardLayers, looks_size: this.getSize, @@ -482,8 +482,6 @@ class Scratch3LooksBlocks { // Else return name return util.target.getCostumes()[util.target.currentCostume].name; } - - doNothing () {} } module.exports = Scratch3LooksBlocks; diff --git a/src/blocks/scratch3_sensing.js b/src/blocks/scratch3_sensing.js index 73e4ea7a9..927dff967 100644 --- a/src/blocks/scratch3_sensing.js +++ b/src/blocks/scratch3_sensing.js @@ -67,7 +67,7 @@ class Scratch3SensingBlocks { sensing_loudness: this.getLoudness, sensing_askandwait: this.askAndWait, sensing_answer: this.getAnswer, - sensing_userid: this.doNothing + sensing_userid: () => {} // legacy no-op block }; } @@ -294,8 +294,6 @@ class Scratch3SensingBlocks { // Otherwise, 0 return 0; } - - doNothing () {} } module.exports = Scratch3SensingBlocks;