Explorar el Código

if (typeof inStr !== "string") {

visuddhinanda hace 3 años
padre
commit
c031fdc180
Se han modificado 1 ficheros con 2 adiciones y 2 borrados
  1. 2 2
      dashboard/src/utils.ts

+ 2 - 2
dashboard/src/utils.ts

@@ -63,8 +63,8 @@ export function PaliToEn(pali: string): string {
   return output;
 }
 
-export function PaliReal(inStr: string): string {
-  if (typeof inStr === "undefined") {
+export function PaliReal(inStr: string | undefined | null): string {
+  if (typeof inStr !== "string") {
     return "";
   }
   const paliLetter = "abcdefghijklmnoprstuvyāīūṅñṭḍṇḷṃ";