Skip to content

Commit

Permalink
fix: Call order
Browse files Browse the repository at this point in the history
  • Loading branch information
HigoRibeiro committed Jul 15, 2019
1 parent 95967fc commit 10512de
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "@rocketseat/adonis-acl",
"version": "1.1.4",
"version": "1.1.6",
"description": "Adonis ACL system",
"main": "src/Acl/index.js",
"directories": {
Expand Down
2 changes: 1 addition & 1 deletion providers/AclProvider.js
Expand Up @@ -65,7 +65,7 @@ class AclProvider extends ServiceProvider {
const authIndex = findIndex(traits, (trait) => trait.action === 'Auth/Client')
const aclIndex = findIndex(traits, (trait) => trait.action === 'Acl/Client')

if (authIndex > -1 && authIndex < aclIndex) {
if (aclIndex > -1 && aclIndex < authIndex) {
throw new Error(WRONG_ORDER_MESSAGE)
}

Expand Down

0 comments on commit 10512de

Please sign in to comment.