From f67098a29b85927d20043bcf58606ab448f92600 Mon Sep 17 00:00:00 2001 From: Maxime Quandalle Date: Thu, 17 Oct 2019 09:12:13 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Serialisation=20d'une=20unit?= =?UTF-8?q?=C3=A9=20nulle?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Corrige #737 --- source/engine/units.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/engine/units.js b/source/engine/units.js index 0dc26fd11..ee425317c 100644 --- a/source/engine/units.js +++ b/source/engine/units.js @@ -19,7 +19,7 @@ let printUnits = (units, count) => const plural = 2 export let serialiseUnit = (rawUnit, count = plural, lng = undefined) => { - if (typeof rawUnit !== 'object') { + if (rawUnit === null || typeof rawUnit !== 'object') { return typeof rawUnit === 'string' ? i18n.t(`units:${rawUnit}`, { count, lng }) : rawUnit