fix: Switch converted to Object Literal (#940)

* updating a switch into object literal and fixed a couple linter errors

* added a comment about weird formatting

* style: use lodash get

* fix: pass eslint + puglint + jest
This commit is contained in:
rbtprograms authored and Nicolas Giard committed 2019-08-04 16:31:13 -04:00
1 parent 2142b5f674
commit 0f9ddf1e5d
28 files changed
+82 -45

No files matched your search

+1 -1
View File
@@ -74,7 +74,7 @@ module.exports = {
}
},
async update(obj, args) {
if(_.some(args.pageRules, pr => {
if (_.some(args.pageRules, pr => {
return pr.match === 'REGEX' && !safeRegex(pr.path)
})) {
throw new gql.GraphQLError('Some Page Rules contains unsafe or exponential time regex.')