mirror of
https://github.com/vale981/Vulcan
synced 2025-03-05 17:41:43 -05:00
Use lowercase typeName for callbacks
This commit is contained in:
parent
8fe3b7abfd
commit
a523125da8
1 changed files with 3 additions and 3 deletions
|
@ -153,17 +153,17 @@ export const createCollection = options => {
|
|||
collection.views = [];
|
||||
|
||||
//register individual collection callback
|
||||
registerCollectionCallback(collectionName);
|
||||
registerCollectionCallback(typeName.toLowerCase());
|
||||
|
||||
// if schema has at least one intl field, add intl callback just before
|
||||
// `${collectionName}.collection` callbacks run to make sure it always runs last
|
||||
if (schemaHasIntlFields(schema)) {
|
||||
hasIntlFields = true; // we have at least one intl field
|
||||
addCallback(`${collectionName}.collection`, addIntlFields);
|
||||
addCallback(`${typeName.toLowerCase()}.collection`, addIntlFields);
|
||||
}
|
||||
|
||||
//run schema callbacks and run general callbacks last
|
||||
schema = runCallbacks({ name: `${collectionName}.collection`, iterator: schema, properties: { options }});
|
||||
schema = runCallbacks({ name: `${typeName.toLowerCase()}.collection`, iterator: schema, properties: { options }});
|
||||
schema = runCallbacks({ name: '*.collection', iterator: schema, properties: { options }});
|
||||
|
||||
if (schema) {
|
||||
|
|
Loading…
Add table
Reference in a new issue