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

Allowing paths to be null for lookups. #1145

Merged
merged 1 commit into from Mar 11, 2021

Conversation

martinheidegger
Copy link
Contributor

When working on my applications, occasionally locales or fallback locales would contain a null object (not undefined). This would result in a hard-to-understand and breaking null pointer error:

TypeError: Cannot read property 'public_food' of null.

With this PR, vuei18n returns the null gracefully instead of throwing an error.

Copy link
Collaborator

@exoego exoego left a comment

Choose a reason for hiding this comment

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

LGTM
Nice!

@kazupon kazupon added the Type: Bug Bug or Bug fixes label Mar 11, 2021
@kazupon
Copy link
Owner

kazupon commented Mar 11, 2021

Good catch!
Thanks!

@kazupon kazupon merged commit dc3a559 into kazupon:v8.x Mar 11, 2021
kodiakhq bot added a commit to WesleyKlop/vote-system that referenced this pull request Mar 12, 2021
Bumps [vue-i18n](https://github.com/kazupon/vue-i18n) from 8.24.0 to 8.24.1.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a href="https://github.com/kazupon/vue-i18n/releases">vue-i18n's releases</a>.</em></p>
<blockquote>
<h2>v8.24.1 (2021-03-11)</h2>
<h4>:bug: Bug Fixes</h4>
<ul>
<li><a href="https://github.com/kazupon/vue-i18n/pull/1145">#1145</a> Allowing paths to be null for lookups. (<a href="https://github.com/martinheidegger"><code>@​martinheidegger</code></a>)</li>
</ul>
<h4>Committers: 1</h4>
<ul>
<li>Martin Heidegger (<a href="https://github.com/martinheidegger"><code>@​martinheidegger</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a href="https://github.com/kazupon/vue-i18n/blob/v8.x/CHANGELOG.md">vue-i18n's changelog</a>.</em></p>
<blockquote>
<h2>v8.24.1 (2021-03-11)</h2>
<h4>:bug: Bug Fixes</h4>
<ul>
<li><a href="https://github.com/kazupon/vue-i18n/pull/1145">#1145</a> Allowing paths to be null for lookups. (<a href="https://github.com/martinheidegger"><code>@​martinheidegger</code></a>)</li>
</ul>
<h4>Committers: 1</h4>
<ul>
<li>Martin Heidegger (<a href="https://github.com/martinheidegger"><code>@​martinheidegger</code></a>)</li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a href="https://github.com/kazupon/vue-i18n/commit/d42b390a0ad2f0e7064c4b60f6f255529e21cb51"><code>d42b390</code></a> update</li>
<li><a href="https://github.com/kazupon/vue-i18n/commit/b5b67decec7362c4e28f95c871645e8bd239b541"><code>b5b67de</code></a> patch release v8.24.1 (<a href="https://github.com/kazupon/vue-i18n/issues/1146">#1146</a>)</li>
<li><a href="https://github.com/kazupon/vue-i18n/commit/dc3a559856c2fa68f8c3d3e434e06183452b44af"><code>dc3a559</code></a> Allowing paths to be null for lookups. (<a href="https://github.com/kazupon/vue-i18n/issues/1145">#1145</a>)</li>
<li>See full diff in <a href="https://github.com/kazupon/vue-i18n/compare/v8.24.0...v8.24.1">compare view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=vue-i18n&package-manager=npm_and_yarn&previous-version=8.24.0&new-version=8.24.1)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores)

Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting `@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
- `@dependabot ignore this major version` will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)


</details>
This was referenced Mar 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR: merged Type: Bug Bug or Bug fixes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants