浏览代码

+jwtGQLAnon for anon, query recursive walker for object id and regexp

Ivan Asmer 5 年之前
父节点
当前提交
defe3e79e9
共有 1 个文件被更改,包括 1 次插入2 次删除
  1. 1 2
      expand.js

+ 1 - 2
expand.js

@@ -79,8 +79,7 @@ function mmExpandSchema(gqlSchema){
                             function regexp(val){
                                 if (val && typeof val === 'string' && val.startsWith('/') && val.endsWith('/')){
                                     try {
-                                        console.log('regexp', val)
-                                        return new Regexp(val)
+                                        return new RegExp(val.slice(1, -1))
                                     }
                                     catch (e){
                                         return val