From 5b9d611e9c40d1ac50b88cce8c45c3a4a76d6553 Mon Sep 17 00:00:00 2001 From: Rocky Meza Date: Mon, 11 Jun 2012 10:20:00 -0600 Subject: [PATCH] Condensing the getLangDefinition function --- moment.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/moment.js b/moment.js index c5d0853bc..fd04df9fd 100644 --- a/moment.js +++ b/moment.js @@ -289,8 +289,8 @@ // will decide the language based on that, or default to the global // language. function getLangDefinition(m) { - var langKey = (typeof m === 'object') && m._lang || - (typeof m === 'string') && m || + var langKey = (typeof m === 'string') && m || + m && m._lang || currentLanguage; return languages[langKey]; -- 2.47.3