Skip to content

Commit

Permalink
fix: Added bugfix for no decorators
Browse files Browse the repository at this point in the history
Signed-off-by: Muskan Bararia <[email protected]>
  • Loading branch information
Muskan Bararia committed Nov 6, 2023
1 parent 34be7eb commit a512353
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions packages/concerto-core/lib/decoratormanager.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,7 @@ class DecoratorManager {
return {
modelManager:newModelManager,
decoratorCommandSet:dcms,
vocabularies:vocab,
decoractorDict
vocabularies:vocab
};
}

Expand Down Expand Up @@ -680,9 +679,11 @@ class DecoratorManager {
* @param {string} property - property on which decorator has been applied
*/
static processDecorators(namespace, decorators, decoratorDict, shouldRemoveDecorators,decl,property) {
this.addToDict(decoratorDict, namespace, decorators,decl,property);
if (shouldRemoveDecorators && decorators) {
decorators.length = 0; // Clears the array in an efficient way
if (decorators){
this.addToDict(decoratorDict, namespace, decorators,decl,property);
if (shouldRemoveDecorators && decorators) {
decorators.length = 0; // Clears the array in an efficient way
}
}
}
}
Expand Down

0 comments on commit a512353

Please sign in to comment.