Skip to content

Commit

Permalink
fix(decorator-util): uncomment error
Browse files Browse the repository at this point in the history
when testing with one of our production apps (gi-kis) we have two models (OrderLinkedForm & CoverSheetForm) which define both the same index FORMS_ORDER_ID_TYPE and extend Form and BaseForm, an error will occur when decorators are executed, this should work.
for now we just uncomment the error
  • Loading branch information
michaelwittwer committed Jan 11, 2019
1 parent ef18185 commit 18a83fb
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/decorator/impl/index/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,10 @@ function initOrUpdateGSI(
indexData: IndexData,
): Partial<PropertyMetadata<any>> {
if (indexes[indexData.name]) {
throw new Error(
'the property with name is already registered as key for index - one property can only define one key per index'
)
// TODO LOW:INVESTIGATE when we throw an error we have a problem where multiple different classes extend one base class, this will be executed multiple times
// throw new Error(
// 'the property with name is already registered as key for index - one property can only define one key per index'
// )
} else {
indexes[indexData.name] = indexData.keyType
}
Expand Down

0 comments on commit 18a83fb

Please sign in to comment.