Pass with --fix

This commit is contained in:
Ray Schamp 2017-08-26 13:07:47 -04:00
parent a4d634d84d
commit 5113876588
14 changed files with 74 additions and 77 deletions

View file

@ -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) {

View file

@ -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

View file

@ -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,

View file

@ -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];
}
}