Fix TypeErrors on undefined manifest entries after manifest update - #618
Merged
Conversation
Manifest updates can drop hashes that player data still references, so manifest lookups (getInventoryItem, getActivity, getActivityMode) can return undefined. Guard the spots that dereferenced displayProperties without a null check: - getPlugName now returns null for missing/incomplete plug descriptions, covering the two call sites (randomized plug sets, singleInitialItemHash) that didn't guard the lookup result - parsePublicMilestones skips activities whose hash no longer resolves, tolerates a missing activity mode in the icon fallback, and skips the GoA weekly-dungeon workaround if its hashes are gone Adds regression tests for all of the above. Also documents copying the gitignored keys.ts into new workspaces in CLAUDE.md. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
After the latest manifest bump, the app threw repeated errors like:
and the same error from
MilestoneParserService.Root cause
Manifest updates can drop hashes that sockets / public milestones still reference. The cache lookups (
getInventoryItem,getActivity,getActivityMode) returnundefinedfor those, and several call sites dereferenced.displayPropertieswithout a null check.Fixes
gear-parser.service.ts:getPlugNamenow returns null for missing/incomplete plug descriptions. This covers the two call sites (randomized plug set options,singleInitialItemHash) that passed unguarded lookup results in; both alreadycontinueon a null name.milestone-parser.service.ts(parsePublicMilestones):Testing
ng test: 259/259 pass; lint: 0 errorsAlso documents copying the gitignored
keys.tsinto new workspaces in CLAUDE.md.🤖 Generated with Claude Code