Explorar o código

handle options request for all axios versions

Futa Arai hai 9 meses
pai
achega
db5ee6a90a
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      packages/remark-attachment-refs/src/server/routes/refs.ts

+ 3 - 1
packages/remark-attachment-refs/src/server/routes/refs.ts

@@ -180,7 +180,9 @@ export const routesFactory = (crowi): any => {
       const user = req.user;
       const { prefix, pagePath } = req.query;
       const options: Record<string, string | undefined> =
-        req.query.options ?? {};
+        typeof req.query.options === 'string'
+          ? JSON.parse(req.query.options)
+          : (req.query.options ?? {});
 
       // check either 'prefix' or 'pagePath ' is specified
       if (prefix == null && pagePath == null) {