From 9c40c7482e4ff9c34776d47b4091f0f8aea1d249 Mon Sep 17 00:00:00 2001 From: Chris Myers Date: Sun, 7 Jan 2018 03:21:25 +0000 Subject: [PATCH] Add info about removed warning (#484) * Update 03-parent-locale.md This warning was removed in 2.16.0 (https://github.com/moment/moment/commit/a83615a3dfdef0f4ddda3a4bcdfc90028e158d07#diff-6d534a0c3c9df392784bdfbc68d046b3) However, an exception was thrown when using a moment defined with non existent parent. This bug was fixed in PR #4310. This documentation reflects this. * Update 03-parent-locale.md * Update 03-parent-locale.md --- guides/moment/02-warnings/03-parent-locale.md | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/guides/moment/02-warnings/03-parent-locale.md b/guides/moment/02-warnings/03-parent-locale.md index ecf675bfb..8bfbf5714 100644 --- a/guides/moment/02-warnings/03-parent-locale.md +++ b/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. \ No newline at end of file +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.