Eliminated an outdated TODO

This commit is contained in:
Jeff Parsons 2017-08-03 08:18:35 -07:00 committed by Jeff Parsons
commit c397937a87
4 changed files with 6 additions and 12 deletions

View file

@ -780,11 +780,8 @@ class Computer extends Component {
* Object or a string), but components are supposed to store only Objects, so if a
* string comes back, something went wrong. By explicitly eliminating "string" data,
* the Closure Compiler stops complaining that we might be passing strings to our
* powerUp() functions (even though we know we're not).
*
* TODO: Determine if there's some way to coerce the Closure Compiler into treating
* data as Object or null, without having to include this runtime check. An assert
* would be a good idea, but this is overkill.
* powerUp() functions (even though we know we're not). We could also add @type
* overrides to the data assignments, but this seems like a useful runtime check.
*/
if (typeof data === "string") data = null;