Repository navigation
Remove two more unnecessary-check patterns; bump to v1.0.6 - #6
Merged
Merged
Conversation
- Drop `e instanceof GLib.Error` guard in runCommand()'s first catch — proc.init() only ever throws GLib.Error given our fully-controlled argv, so the check never does anything. The sibling catch block a few lines down (around communicate_utf8_async) never had this guard, which made the asymmetry obvious in hindsight. - Drop optional chaining on this._networkNameLabel in _maybeNotifyStateChange — _buildMenu() always runs before _refresh() can reach this code path, so the label is guaranteed to exist. Same category as the this._destroyed flag removed in dca6371: a defensive check written for a case that can't actually happen at its call site.
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.
Summary
e instanceof GLib.Errorguard inrunCommand()—proc.init()only ever throwsGLib.Errorgiven our controlled argv, so the check was dead weight, same category as the reviewer-flagged_destroyedflagthis._networkNameLabelin_maybeNotifyStateChange— guaranteed non-null at that call site since_buildMenu()always runs before_refresh()can reach itversion-nameto1.0.6Test plan
node --check extension.jsmetadata.jsonJSON validation