From 00ebee91bc9c612db6bb180dc35e7069aa63e6a6 Mon Sep 17 00:00:00 2001 From: Rory Abraham Date: Thu, 24 Jun 2021 16:58:31 -0700 Subject: [PATCH] Preload locales to fix native crash --- src/libs/DateUtils.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/libs/DateUtils.js b/src/libs/DateUtils.js index 84b44f501a15..7b9e77d9c919 100644 --- a/src/libs/DateUtils.js +++ b/src/libs/DateUtils.js @@ -1,5 +1,8 @@ -import moment from 'moment'; -import 'moment-timezone'; +import moment from 'moment-timezone'; + +// IMPORTANT: load any locales (other than english) that might be passed to moment.locale() +import 'moment/locale/es'; + import _ from 'underscore'; import Onyx from 'react-native-onyx'; import ONYXKEYS from '../ONYXKEYS';