Explorar el Código

Locale: fix empty string (#2302)

cinwell.li hace 8 años
padre
commit
87699ef3ca
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      src/locale/index.js

+ 1 - 1
src/locale/index.js

@@ -22,7 +22,7 @@ let i18nHandler = function() {
 
 export const t = function(path, options) {
   let value = i18nHandler.apply(this, arguments);
-  if (value) return value;
+  if (value !== null || value !== undefined) return value;
 
   const array = path.split('.');
   let current = lang;