@adonisjs/lucid
Advanced tools
Comparing version 4.0.4 to 4.0.5
@@ -0,1 +1,16 @@ | ||
<a name="4.0.5"></a> | ||
## [4.0.5](https://github.com/adonisjs/adonis-lucid/compare/v4.0.4...v4.0.5) (2017-07-30) | ||
### Bug Fixes | ||
* **hooks:** fix bad validation behavior ([1b3a0d5](https://github.com/adonisjs/adonis-lucid/commit/1b3a0d5)) | ||
### Features | ||
* **commands:** add config:database command ([98a318a](https://github.com/adonisjs/adonis-lucid/commit/98a318a)) | ||
<a name="4.0.4"></a> | ||
@@ -2,0 +17,0 @@ ## [4.0.4](https://github.com/adonisjs/adonis-lucid/compare/v4.0.3...v4.0.4) (2017-07-30) |
{ | ||
"name": "@adonisjs/lucid", | ||
"version": "4.0.4", | ||
"version": "4.0.5", | ||
"description": "SQL ORM built on top of Active Record pattern", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -41,2 +41,10 @@ 'use strict' | ||
/** | ||
* The events array of aliases, just required | ||
* for validation purposes | ||
* | ||
* @type {Array} | ||
*/ | ||
this._aliasEvents = _.values(this._aliases) | ||
/** | ||
* A map of handlers to be called for each event | ||
@@ -69,3 +77,3 @@ * | ||
addHandler (event, handler, name) { | ||
if (!this._events[event]) { | ||
if (_.includes(this._events[event]) && !_.includes(this._aliasEvents, event)) { | ||
throw CE.InvalidArgumentException.invalidParameter(`${event} is not a valid hook event`) | ||
@@ -72,0 +80,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
224963
45
7034