mirror of
https://github.com/scratchfoundation/scratch-vm.git
synced 2024-12-24 15:02:52 -05:00
Merge pull request #584 from rschamp/nit/no-useless-call
Fix no-useless-call todo
This commit is contained in:
commit
adcd225598
2 changed files with 2 additions and 7 deletions
|
@ -114,7 +114,7 @@ class Scratch3SensingBlocks {
|
||||||
}
|
}
|
||||||
|
|
||||||
getKeyPressed (args, util) {
|
getKeyPressed (args, util) {
|
||||||
return util.ioQuery('keyboard', 'getKeyIsDown', args.KEY_OPTION);
|
return util.ioQuery('keyboard', 'getKeyIsDown', [args.KEY_OPTION]);
|
||||||
}
|
}
|
||||||
|
|
||||||
daysSince2000 () {
|
daysSince2000 () {
|
||||||
|
|
|
@ -218,12 +218,7 @@ const execute = function (sequencer, thread) {
|
||||||
// Find the I/O device and execute the query/function call.
|
// Find the I/O device and execute the query/function call.
|
||||||
if (runtime.ioDevices[device] && runtime.ioDevices[device][func]) {
|
if (runtime.ioDevices[device] && runtime.ioDevices[device][func]) {
|
||||||
const devObject = runtime.ioDevices[device];
|
const devObject = runtime.ioDevices[device];
|
||||||
// @todo Figure out why eslint complains about no-useless-call
|
return devObject[func].apply(devObject, args);
|
||||||
// no-useless-call can't tell if the call is useless for dynamic
|
|
||||||
// expressions... or something. Not exactly sure why it
|
|
||||||
// complains here.
|
|
||||||
// eslint-disable-next-line no-useless-call
|
|
||||||
return devObject[func].call(devObject, args);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue