Closed Fang- closed 5 years ago
On Fri, Jun 28, 2019 at 06:31:34AM -0700, Fang wrote:
Quick and dirty edit. Reminder that we should replace these ship class checks with something more standard at some point.
LGTM bru. I replaced the magic numbers with constants, plus added test cases to keep our vaunted 100% coverage.
Not sure why we put the
{}
for things we don't derive, instead of straight-upnull
. Certainly the latter would be easier to check for?
Yeah that sounds about right. I think I used {} initially because I was
new to the JavaScripts and thought that it was more appropriate than
null
(as it is intuitively of the same type). But of course typeof null
returns 'object', so.. :-)
Quick and dirty edit. Reminder that we should replace these ship class checks with something more standard at some point.
Not sure why we put the
{}
for things we don't derive, instead of straight-upnull
. Certainly the latter would be easier to check for?