diff --git a/extensions/0832/rxFS.js b/extensions/0832/rxFS.js index 4191496066..331cc5d18a 100644 --- a/extensions/0832/rxFS.js +++ b/extensions/0832/rxFS.js @@ -149,6 +149,7 @@ { blockIconURI: file, opcode: "search", + hideFromPalette: true, blockType: Scratch.BlockType.REPORTER, text: Scratch.translate("search [STR]"), arguments: { @@ -200,8 +201,11 @@ del({ STR }) { str = btoa(unescape(encodeURIComponent(STR))); - rxFSfi[rxFSsy.indexOf(str) + 1 - 1] = undefined; - rxFSsy[rxFSsy.indexOf(str) + 1 - 1] = undefined; + const index = rxFSsy.indexOf(str); + if (index !== -1) { + rxFSfi.splice(index, 1); + rxFSsy.splice(index, 1); + } } file({ STR, STR2 }) { diff --git a/extensions/0832/rxFS2.js b/extensions/0832/rxFS2.js index 4e631709b9..31fad1e381 100644 --- a/extensions/0832/rxFS2.js +++ b/extensions/0832/rxFS2.js @@ -180,6 +180,7 @@ { blockIconURI: folder, opcode: "search", + hideFromPalette: true, blockType: Scratch.BlockType.REPORTER, text: Scratch.translate({ id: "search", default: "search [STR]" }), arguments: { @@ -225,8 +226,11 @@ del({ STR }) { str = encodeURIComponent(STR); - rxFSfi[rxFSsy.indexOf(str) + 1 - 1] = undefined; - rxFSsy[rxFSsy.indexOf(str) + 1 - 1] = undefined; + const index = rxFSsy.indexOf(str); + if (index !== -1) { + rxFSfi.splice(index, 1); + rxFSsy.splice(index, 1); + } } folder({ STR, STR2 }) {