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

Add info about removed warning #484

Merged
merged 3 commits into from Jan 7, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 2 additions & 11 deletions guides/moment/02-warnings/03-parent-locale.md
@@ -1,16 +1,7 @@
---
title: Parent Locale Undefined
---
```
specified parentLocale is not defined yet
```

This warning is displayed when a locale is defined with a specified parent locale that does not exist.
Warning removed since **2.16.0**.

Because 'xyz' is not a locale, the following code will result in this warning:

```javascript
moment.defineLocale('fakeLocale', {parentLocale:'xyz'})
```

To fix this, choose a parent locale that is already defined. If you are defining a locale that will be the parent of another locale, make sure that your locales are defined in order.
A locale can be defined with a parent before the parent itself is defined or loaded. If the parent doesn't exist or can't be lazy loaded when the moment is created, the parent will default to the global locale.