Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix potential bug on early return #580

Merged
merged 1 commit into from
Oct 20, 2023
Merged

Conversation

irahopkinson
Copy link
Contributor

@irahopkinson irahopkinson commented Oct 19, 2023


This change is Reviewable

- this was found when adding eslint rule for `as` PR #577.
Copy link
Member

@tjcouch-sil tjcouch-sil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm: thanks for doing this!

Reviewed 2 of 2 files at r1, all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved


src/node/services/node-file-system.service.ts line 95 at r1 (raw file):

function fillMissingEntryTypeProperties(
  entryMap: Map<EntryType, Uri[]> = new Map(),
): Map<EntryType, Uri[]> {

This works great as-is, but you could probably put the Object.freeze and Object.fromEntries in here and just have this return DirectoryEntries if you wanted to make it a bit more concise :)

Copy link
Member

@lyonsil lyonsil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:lgtm:

Reviewed all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved

@irahopkinson irahopkinson merged commit 392dba3 into main Oct 20, 2023
7 checks passed
@irahopkinson irahopkinson deleted the fix-potential-as-bug branch October 20, 2023 20:21
@irahopkinson
Copy link
Contributor Author

src/node/services/node-file-system.service.ts line 95 at r1 (raw file):

Previously, tjcouch-sil (TJ Couch) wrote…

This works great as-is, but you could probably put the Object.freeze and Object.fromEntries in here and just have this return DirectoryEntries if you wanted to make it a bit more concise :)

Yes, that would be more concise but then that would be out of scope for how this function is named and that reality would not be obvious to the calling function. I've left it as is.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants