mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2025-01-10 15:02:06 -05:00
Pass with --fix
This commit is contained in:
parent
a4d634d84d
commit
5113876588
14 changed files with 74 additions and 77 deletions
|
@ -458,10 +458,7 @@ class Blocks {
|
|||
`<${tagName}
|
||||
id="${block.id}"
|
||||
type="${block.opcode}"
|
||||
${block.topLevel ?
|
||||
`x="${block.x}" y="${block.y}"` :
|
||||
''
|
||||
}
|
||||
${block.topLevel ? `x="${block.x}" y="${block.y}"` : ''}
|
||||
>`;
|
||||
// Add any mutation. Must come before inputs.
|
||||
if (block.mutation) {
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
* Object representing a Scratch list.
|
||||
*/
|
||||
|
||||
/**
|
||||
/**
|
||||
* @param {!string} name Name of the list.
|
||||
* @param {Array} contents Contents of the list, as an array.
|
||||
* @constructor
|
||||
|
|
|
@ -60,7 +60,7 @@ const parseScratchObject = function (object, runtime) {
|
|||
sprite.name = object.name;
|
||||
}
|
||||
if (object.hasOwnProperty('blocks')) {
|
||||
for (let blockId in object.blocks) {
|
||||
for (const blockId in object.blocks) {
|
||||
blocks.createBlock(object.blocks[blockId]);
|
||||
}
|
||||
// console.log(blocks);
|
||||
|
@ -100,7 +100,7 @@ const parseScratchObject = function (object, runtime) {
|
|||
const target = sprite.createClone();
|
||||
// Load target properties from JSON.
|
||||
if (object.hasOwnProperty('variables')) {
|
||||
for (let j in object.variables) {
|
||||
for (const j in object.variables) {
|
||||
const variable = object.variables[j];
|
||||
const newVariable = new Variable(
|
||||
variable.id,
|
||||
|
|
|
@ -32,9 +32,9 @@ class StringUtil {
|
|||
const index = text.indexOf(separator);
|
||||
if (index >= 0) {
|
||||
return [text.substring(0, index), text.substring(index + 1)];
|
||||
} else {
|
||||
return [text, null];
|
||||
}
|
||||
return [text, null];
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue