Skip to content

refactor: Use !count instead of count == 0 in package.json

Paul Slaughter requested to merge ps-refactor-count-equals-0-package-json into main

Description

From this comment

suggestion (non-blocking): VSCode can coerce this numeric value to a boolean which I think is slightly more preferable than strictly checking for 0.

Context values don't start out as numeric. This means when we initially load everything, if for some reason we weren't able to set this context value, we'd see a blank screen:

Screenshot_2023-06-01_at_10.40.39_AM

It's very unlikely this will happen in the current state (since we trigger updateExtensionStatus in the ctor), but in the long run, I think it's worth being resilient and reducing the runtime coupling.

Not a blocker here. I'll create a small follow-up MR for this 👀

Merge request reports