Skip to content

Commit e8bf239

Browse files
committed
Update addons - replace replaceAll with replace when easy
1 parent de8f5ae commit e8bf239

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

src/addons/addons/middle-click-popup/BlockTypeInfo.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ export class BlockInputEnum extends BlockInput {
207207
this.values = [];
208208
for (let i = 0; i < options.length; i++) {
209209
if (typeof options[i][1] === "string" && BlockInputEnum.INVALID_VALUES.indexOf(options[i][1]) === -1) {
210-
this.values.push({ value: options[i][1], string: options[i][0].replaceAll(String.fromCharCode(160), " ") });
210+
this.values.push({ value: options[i][1], string: options[i][0].replace(/\u00a0/g, " ") });
211211
}
212212
}
213213
this.isRound = isRound;

src/addons/addons/middle-click-popup/WorkspaceQuerier.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1072,7 +1072,7 @@ class QueryInfo {
10721072
/** @type {WorkspaceQuerier} */
10731073
this.querier = querier;
10741074
/** @type {string} The query */
1075-
this.str = query.replaceAll(String.fromCharCode(160), " ");
1075+
this.str = query.replace(/\u00a0/g, " ");
10761076
/** @type {string} A lowercase version of the query. Used for case insensitive comparisons. */
10771077
this.lowercase = this.str.toLowerCase();
10781078
/** @type {number} A unique identifier for this query */

src/addons/addons/reorder-custom-inputs/modified-funcs.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ export function modifiedCreateAllInputs(connectionMap) {
3333
}
3434

3535
// remove all traces of %l at the earliest possible time
36-
this.procCode_ = this.procCode_.replaceAll("%l ", "");
36+
this.procCode_ = this.procCode_.replace(/%l /g, "");
3737
}
3838

3939
//https://github.com/scratchfoundation/scratch-blocks/blob/f210e042988b91bcdc2abeca7a2d85e178edadb2/blocks_vertical/procedures.js#L565
+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
{"commit":"c237cfa"}
1+
{"commit":"2b49ae3"}

0 commit comments

Comments
 (0)