Skip to content

Commit

Permalink
Handle case where hooks are not provided
Browse files Browse the repository at this point in the history
  • Loading branch information
sebelga committed May 16, 2022
1 parent 76a4849 commit dd0ef47
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/core/server/saved_objects/service/lib/repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,16 @@ export class SavedObjectsRepository {
mappings,
client,
typeRegistry,
hooks,
hooks = {
preHooks: {
get: [],
create: [],
},
postHooks: {
get: [],
create: [],
},
},
serializer,
migrator,
allowedTypes = [],
Expand Down

0 comments on commit dd0ef47

Please sign in to comment.