浏览代码

fix: path parser intermittent locale search match (#832)

Nick 6 年之前
父节点
当前提交
4552c6d2b0
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      server/helpers/page.js

+ 2 - 2
server/helpers/page.js

@@ -2,8 +2,8 @@ const qs = require('querystring')
 const _ = require('lodash')
 const crypto = require('crypto')
 
-const localeSegmentRegex = /^[A-Z]{2}(-[A-Z]{2})?$/gi
-const systemSegmentRegex = /^[A-Z]\//gi
+const localeSegmentRegex = /^[A-Z]{2}(-[A-Z]{2})?$/i
+const systemSegmentRegex = /^[A-Z]\//i
 
 /* global WIKI */