-
Notifications
You must be signed in to change notification settings - Fork 825
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
cleanup unnecessary nullish coalescing operation #7658
Conversation
|
@@ -27,7 +27,7 @@ export async function getWorkerdCompatibilityDate() { | |||
const match = latestWorkerdVersion.match(/\d+\.(\d{4})(\d{2})(\d{2})\.\d+/); | |||
|
|||
if (match) { | |||
const [, year, month, date] = match ?? []; | |||
const [, year, month, date] = match; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Notice the if (match)
right above 👆, match
has to be truthy here
A wrangler prerelease is available for testing. You can install this latest build in your project with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12589273967/npm-package-wrangler-7658 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/7658/npm-package-wrangler-7658 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12589273967/npm-package-wrangler-7658 dev path/to/script.js Additional artifacts:wget https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12589273967/npm-package-cloudflare-workers-bindings-extension-7658 -O ./cloudflare-workers-bindings-extension.0.0.0-vf52fc542c.vsix && code --install-extension ./cloudflare-workers-bindings-extension.0.0.0-vf52fc542c.vsix npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12589273967/npm-package-create-cloudflare-7658 --no-auto-update npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12589273967/npm-package-cloudflare-kv-asset-handler-7658 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12589273967/npm-package-miniflare-7658 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12589273967/npm-package-cloudflare-pages-shared-7658 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12589273967/npm-package-cloudflare-unenv-preset-7658 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12589273967/npm-package-cloudflare-vitest-pool-workers-7658 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12589273967/npm-package-cloudflare-workers-editor-shared-7658 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12589273967/npm-package-cloudflare-workers-shared-7658 npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/12589273967/npm-package-cloudflare-workflows-shared-7658 Note that these links will no longer work once the GitHub Actions artifact expires.
Please ensure constraints are pinned, and |
Extremely minimal cleanup, just removing an unnecessary nullish coalescing operation noticed by @vicb (comment) when I copied this code over to out open-next adapter.