fix: model.beforeCreate not called (#343)
* fix: model.beforeCreate not called * chore: condition
This commit is contained in:
parent
4612739021
commit
b4b97b9f30
@ -27,7 +27,7 @@ export class ModelHook {
|
||||
|
||||
findModelName(hookArgs) {
|
||||
for (const arg of hookArgs) {
|
||||
if (arg instanceof Model) {
|
||||
if (arg?._previousDataValues) {
|
||||
return (<Model>arg).constructor.name;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user