Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Same here. In MoonDebriefState.js, the marked line errored out, because departedLocation was null.

     var departedLocation = LunarFeatures.locationForBase (baseDeparted);
 >   var deltaX = departedLocation[0] - _base.loc_x;  <
     var deltaY = departedLocation[1] - _base.loc_y;
     _distanceTraveled = Math.floor (Math.sqrt ((deltaX * deltaX) + (deltaY * deltaY)));
(Safari 15.4 on macOS 12.3.1)


I should have just fixed this if you refresh.

There is a value I expect to find in LOCAL STORAGE that is null when you first try play the game — I was not allowing for that.

I should have know to blow away local storage when testing. Since I have been developing it, of course, at some point that value was added to my local storage and I was free to write all manner of bugs that assume it is there.


Works!




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: