Updated new page modal to no longer disable page creation for page names 2 characters or less. Removed local regex check as the new page model already prepends the locale.

pull/7440/head
Brian Powell Jr 1 year ago
parent ab5c620d50
commit 6a1ac35ca5
No known key found for this signature in database
GPG Key ID: 452080FC5442B172

@ -103,8 +103,6 @@
import _ from 'lodash' import _ from 'lodash'
import gql from 'graphql-tag' import gql from 'graphql-tag'
const localeSegmentRegex = /^[A-Z]{2}(-[A-Z]{2})?$/i
/* global siteLangs, siteConfig */ /* global siteLangs, siteConfig */
export default { export default {
@ -190,11 +188,7 @@ export default {
return false return false
} }
const firstSection = _.head(this.currentPath.split('/')) const firstSection = _.head(this.currentPath.split('/'))
if (firstSection.length <= 1) { if (
return false
} else if (localeSegmentRegex.test(firstSection)) {
return false
} else if (
_.some(['login', 'logout', 'register', 'verify', 'favicons', 'fonts', 'img', 'js', 'svg'], p => { _.some(['login', 'logout', 'register', 'verify', 'favicons', 'fonts', 'img', 'js', 'svg'], p => {
return p === firstSection return p === firstSection
})) { })) {

Loading…
Cancel
Save