Eliminated an outdated TODO
This commit is contained in:
parent
7fbc84195b
commit
c397937a87
4 changed files with 6 additions and 12 deletions
|
|
@ -780,11 +780,8 @@ class Computer extends Component {
|
||||||
* Object or a string), but components are supposed to store only Objects, so if a
|
* 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,
|
* string comes back, something went wrong. By explicitly eliminating "string" data,
|
||||||
* the Closure Compiler stops complaining that we might be passing strings to our
|
* the Closure Compiler stops complaining that we might be passing strings to our
|
||||||
* powerUp() functions (even though we know we're not).
|
* 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.
|
||||||
* 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.
|
|
||||||
*/
|
*/
|
||||||
if (typeof data === "string") data = null;
|
if (typeof data === "string") data = null;
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
|
|
@ -75430,11 +75430,8 @@ class Computer extends Component {
|
||||||
* Object or a string), but components are supposed to store only Objects, so if a
|
* 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,
|
* string comes back, something went wrong. By explicitly eliminating "string" data,
|
||||||
* the Closure Compiler stops complaining that we might be passing strings to our
|
* the Closure Compiler stops complaining that we might be passing strings to our
|
||||||
* powerUp() functions (even though we know we're not).
|
* 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.
|
||||||
* 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.
|
|
||||||
*/
|
*/
|
||||||
if (typeof data === "string") data = null;
|
if (typeof data === "string") data = null;
|
||||||
|
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue