From b0c4bc5dbfb931997e2288f7f262da5570413562 Mon Sep 17 00:00:00 2001 From: Chris Myers Date: Sat, 6 Jan 2018 11:51:09 +0000 Subject: [PATCH 1/3] 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. --- 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..f92498ebd 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. +Warnings 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. From 3b47be165b14437dd3b332591e557b97364111d1 Mon Sep 17 00:00:00 2001 From: Chris Myers Date: Sat, 6 Jan 2018 12:04:19 +0000 Subject: [PATCH 2/3] Update 03-parent-locale.md --- guides/moment/02-warnings/03-parent-locale.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/moment/02-warnings/03-parent-locale.md b/guides/moment/02-warnings/03-parent-locale.md index f92498ebd..182b8029f 100644 --- a/guides/moment/02-warnings/03-parent-locale.md +++ b/guides/moment/02-warnings/03-parent-locale.md @@ -2,6 +2,6 @@ title: Parent Locale Undefined --- -Warnings removed since 2.16.0. +Warnings removed since **2.16.0**. 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. From 372de35ebbfd347f7e6f8011e30a37074c25725d Mon Sep 17 00:00:00 2001 From: Kunal Marwaha Date: Sat, 6 Jan 2018 19:16:51 -0800 Subject: [PATCH 3/3] Update 03-parent-locale.md --- guides/moment/02-warnings/03-parent-locale.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/guides/moment/02-warnings/03-parent-locale.md b/guides/moment/02-warnings/03-parent-locale.md index 182b8029f..8bfbf5714 100644 --- a/guides/moment/02-warnings/03-parent-locale.md +++ b/guides/moment/02-warnings/03-parent-locale.md @@ -2,6 +2,6 @@ title: Parent Locale Undefined --- -Warnings removed since **2.16.0**. +Warning removed since **2.16.0**. 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.