Explorar el Código

handle LsxApiOptions request for all axios versions

Futa Arai hace 9 meses
padre
commit
5b120fe3f7
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      packages/remark-lsx/src/server/index.ts

+ 2 - 1
packages/remark-lsx/src/server/index.ts

@@ -19,7 +19,8 @@ const lsxValidator = [
     .optional()
     .customSanitizer((options) => {
       try {
-        const jsonData: LsxApiOptions = options;
+        const jsonData: LsxApiOptions =
+          typeof options === 'string' ? JSON.parse(options) : options;
 
         for (const key in jsonData) {
           jsonData[key] = filterXSS.process(jsonData[key]);